var http = require('http')
var options = {
host:'ask.39.net',
path:'/browse/313-2-1.html',
headers:{
'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31',
'Referer':'http://ask.39.net/browse/313-1-1.html',
'Connection':'keep-alive'
}
}
http.get(options,function(res){
res.setEncoding('gb2312')
res.on('data',function(data){
console.log(data)
})
})
出现下面的错误
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at errnoException (net.js:883:11)
at TCP.onread (net.js:539:19)