interaptor
Intercept HTTP requests for testing purposes. Uses mitm under the hood.
Installation
$ npm install interaptor --save
Usage
const intercept = ;const request = ; // intercept http://api.digitalocean.com/v2/droplets only // set Content-Type response header // set response status code // set response body (if object, will be JSON.stringify'ed) ;
Tests
$ make test
License
Interaptor is released under the MIT license.