sideshowcoder / canned

Server to respond with fake API responses, by using a directory of files for finding out what to say!
213 stars 46 forks source link

Option to proxy requests for unknown paths #56

Open sideshowcoder opened 9 years ago

sideshowcoder commented 9 years ago

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.

git-jiby-me commented 8 years ago

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