goreleaser-action/node_modules/mimic-response
CrazyMax e28e23212c Initial commit 2019-09-20 22:23:46 +02:00
..
index.js Initial commit 2019-09-20 22:23:46 +02:00
license Initial commit 2019-09-20 22:23:46 +02:00
package.json Initial commit 2019-09-20 22:23:46 +02:00
readme.md Initial commit 2019-09-20 22:23:46 +02:00

readme.md

mimic-response Build Status

Mimic a Node.js HTTP response stream

Install

$ npm install mimic-response

Usage

const stream = require('stream');
const mimicResponse = require('mimic-response');

const responseStream = getHttpResponseStream();
const myStream = new stream.PassThrough();

mimicResponse(responseStream, myStream);

console.log(myStream.statusCode);
//=> 200

API

mimicResponse(from, to)

from

Type: Stream

Node.js HTTP response stream.

to

Type: Stream

Any stream.

License

MIT © Sindre Sorhus