Receive.js – simple mocking of remote HTTP requests

This is a quick and really basic node.js snippet for mocking up remote HTTP requests, like API calls.

During initial development of an API client, sometimes you just want to see what the server is receiving in real time, so you can hack things together quickly. This script sets up a HTTP server which spits out the URL requested, along with header information and any POSTed parameters.

Ideally, you could have this running on a parallel screen as you code, so you can see requests as they come in. This could also be used for simple mocking out of responses, but I haven’t gone that far :)

receive.js on github.

This entry was posted in Miscellaneous. Bookmark the permalink. Both comments and trackbacks are currently closed.