canned icon indicating copy to clipboard operation
canned copied to clipboard

Option to proxy requests for unknown paths

Open sideshowcoder opened this issue 10 years ago • 1 comments

If canned is used to stub out requests for a server it can be useful to proxy requests for unknown routes. The idea is to instead of serving a 404 forward the request to specified server and serve the result.

$ canned ./example --proxy=http://example.com 

when querying for a path that is not present in canned like

$ curl http://localhost:3000/i_dont_exist_in_canned

it shoudl issue a query to http://example.com/i_dont_exist_in_canned and serve whatever the result of this query is.

sideshowcoder avatar Feb 04 '15 22:02 sideshowcoder

https://github.com/sideshowcoder/canned/pull/84

git-jiby-me avatar Nov 25 '15 18:11 git-jiby-me