record-http

0.6.1 • Public • Published

HTTP Request Recorder

Circle CI Dependency Status devDependency Status

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

Readme

Keywords

none

Package Sidebar

Install

npm i record-http

Weekly Downloads

3

Version

0.6.1

License

ISC

Last publish

Collaborators

  • hallettj
  • originate-owner
  • kevingoslar