var options = {
host: '192.168.1.80',//80是我的本机
port: '80',
};
var req = http.get(options);
用这个方法发送请求时如果发送到自己的本机就会很快而且不会报错,但如果把host地址改成192.168.1.2的服务器地址 就会报错,错误如下: events.js:72 throw er; // Unhandled 'error' event ^ Error: Parse Error at Socket.socketOnData (http.js:1584:20) at TCP.onread (net.js:525:27) 不明白是为什么,求指点