在进行http.request时,有2个事件会产生错误:request.on(‘error’)和response.on(‘error’).
我看不出有什么不同,因为这两个错误都来自Web服务器.
thisError和thatError有什么区别?
var request = http.request({hostname:"example.com"},function(response){ response.on('error',function(thisError){ //what's the difference between thisError <<<<<< }); }); request.on('error',function(thatError){ //and thatError <<<<< });