Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

http-capture

tonyffrench5MIT1.0.2

Express/Connect middleware for capturing HTTP request and responses

http, capture, express, connect, peek, save, debug

readme

http-capture

NPM Version NPM Downloads

Node.js express middleware for capturing HTTP request and responses

Install

$ npm install http-capture

API

var httpCapture = require ('http-capture')

httpCapture ()

Returns the HTTP capture middleware function, which by default writes to the current working directory under .capture and formats the files as such: #YYYYMM_DD_hh_mm_ss_METHOD

Examples

Express / Connect

When using this module with express or connect, simply app.use the module. Requests and responses that pass through the middleware will be captured to in the current working directory under .capture

var httpCapture = require ('http-capture'),
    express = require ('express')

var app = express()

app.use (httpCapture())

License

MIT

changelog

1.0.0 / 2015-04-21

  • Express middleware to capture HTTP request and response data to .catpure/X_DATA_TIME_METHOD