atcheck/lsscanner/new_ubuntu/node_modules_win/mimic-response
2019-12-16 18:48:29 +01:00
..
index.js Integracja z czytnikiem 2019-12-16 18:48:29 +01:00
license Integracja z czytnikiem 2019-12-16 18:48:29 +01:00
package.json Integracja z czytnikiem 2019-12-16 18:48:29 +01:00
readme.md Integracja z czytnikiem 2019-12-16 18:48:29 +01:00

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