错误连接ECONNREFUSED
我收到这个错误,无法解决这个问题。
events.js:72
throw er; // Unhandled 'error' event
^
错误:在Object.afterConnect [ascomplete](net.js:892:19)处的errnoException(net.js:901:11)处连接ECONNREFUSED
var http = require('http');
var options = {
host: 'localhost',
port: '8081',
path: '/index.htm'
};
var callback = function(response){
var body = '';
response.on('data', function(data) {
body += data;
});
response.on('end', function() {
console.log(body);
});
}
var req = http.request(options, callback);
req.end();
链接地址: http://www.djcxy.com/p/87251.html