prc b6c02717e6 Upload complete no-internet building environment. hace 1 año
..
index.js b6c02717e6 Upload complete no-internet building environment. hace 1 año
license b6c02717e6 Upload complete no-internet building environment. hace 1 año
package.json b6c02717e6 Upload complete no-internet building environment. hace 1 año
readme.md b6c02717e6 Upload complete no-internet building environment. hace 1 año

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.

Related

License

MIT © Sindre Sorhus