record-http
v0.6.1
Published
Records incoming HTTP calls for testing
Downloads
3
Readme
HTTP Request Recorder
records incoming HTTP calls
For black-box testing of network services.
Usage
In your test suite, set up a listener:
HttpRecorder = require('record-http')
listener = new HttpRecorder().listen(7777)
Now this instance records all calls made to port 7777. Access the recorded calls through:
listener.calls
More details around recording calls are here. You can reset the recorded calls (and keep listening for more) via
listener.reset()
An example is given here. Finally, close your instance through
listener.close()
More details around closing are here.
Development
See our developer guidelines