root 3bf41bf355 update | hai 1 ano | |
---|---|---|
.. | ||
index.d.ts | hai 1 ano | |
index.js | hai 1 ano | |
license | hai 1 ano | |
package.json | hai 1 ano | |
readme.md | hai 1 ano |
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.