node-vcr

Returns a new node-vcr proxy middleware.

Source:
Parameters:
Name Type Description
host string

The hostname to proxy to

options object
Properties
Name Type Attributes Default Description
dirname string

The tapes directory

noRecord boolean <optional>
false

If true, requests will return a 404 error if the tape doesn't exist

maxRedirects boolean <optional>
5

If set to 0 redirects will be disabled

tapeRequestBody boolean <optional>
false

If true, the request body will be stored to tape

ignoreHeaders array <optional>
[]

A list of headers which must not be written down to tape

hash function <optional>
messageHash.sync

Provide your own IncomingMessage hash function of the signature function (req, body)

reload boolean <optional>
false

If true, node-vcr will reload (delete and record again) required tape

refresh boolean <optional>
false

If true, node-vcr will refresh (reload only in require.cache) required tape

Returns:

A function of the signature function (req, res) that you can give to an http.Server as its handler

Type
function