Listen for requests of any type and log request body and metadata to standard out.
$ git clone email@example.com:jclem/http-sponge.git$ cd http-sponge$ npm install$ npm start
$ hk create$ git push heroku master
http-sponge is useful when you need to deal with callbacks that happen on an external server that obviously can't send requests to your local apps in development.
Tell your app to direct callback requests at your instance of
heroku. http-sponge will log your requests in a key-value format which can be
parsed by the
bin/mop accepts a string to match URLs against
(you might want to add UUIDs to your callback URL in some way to identify the
requests you want forwarded via grep), and a port to forward requests to on your
$ hk log | grep --line-buffered my-route-to-forward | bin/mop 5000
Now, requests that your non-local app make to your instance of http-sponge will be forwarded along to your local app.
bin/mop forwards the following:
hostheader is removed)