API/api.medcify.app/node_modules/mimic-response
2022-09-26 11:41:44 +05:30
..
index.js final 2022-09-26 11:41:44 +05:30
license final 2022-09-26 11:41:44 +05:30
package.json final 2022-09-26 11:41:44 +05:30
readme.md final 2022-09-26 11:41:44 +05:30

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