发现此问题调试代码,其中以下代码无效:
var req = http.request(options,function(res){
// res.on('error',cb(err));
res.on('end',function(){
cb();
});
});
但是,以下工作有效:
var req = http.request(options,function(res){
// res.on('error',cb(err));
res.on('data',function(chunk){
//why do we need this?
});
res.on('end',function(){
cb();
});
});
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句