-
mimic-response:模拟Node.js HTTP响应流下载
资源介绍
模拟React
模拟
安装
$ 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
原料药
mimicResponse(从,到)
注意#1:不代理from.destroy(error)函数。 您必须手动调用它:
- 上一篇: 考博英语汉英翻译30句
- 下一篇: mimic-iv