刘琳琳 97c35fdf0d 航汇HHArome小程序容器演示 2 месяцев назад
..
index.js 97c35fdf0d 航汇HHArome小程序容器演示 2 месяцев назад
license 97c35fdf0d 航汇HHArome小程序容器演示 2 месяцев назад
package.json 97c35fdf0d 航汇HHArome小程序容器演示 2 месяцев назад
readme.md 97c35fdf0d 航汇HHArome小程序容器演示 2 месяцев назад

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