Muqriz 48f16bfc3e initail first | преди 4 месеца | |
---|---|---|
.. | ||
index.js | преди 4 месеца | |
license | преди 4 месеца | |
package.json | преди 4 месеца | |
readme.md | преди 4 месеца |
Mimic a Node.js HTTP response stream
$ npm install mimic-response
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
Type: Stream
Type: Stream
Any stream.
MIT © Sindre Sorhus