多个readStreams管道请求

时间:2016-07-12 06:41:06

标签: javascript node.js httprequest http-request

是否可以一次性将多个图像发送到远程服务器,或者我是否可以单独发出请求?

var http = require('http');
var request = http.request(options, function(response) {

}

var readStream = fs.ReadStream(images[0]);
readStream.on('error', reject);
readStream.on('close', function(){request.end()});
readStream.pipe(request);

0 个答案:

没有答案