如果是简单的GET请求,则应使用
http.get()
否则,
http.request()需要关闭。
var options = { host: 'localhost', port: 7474, path: '/db/data', method: 'GET', headers: { accept: 'application/json' }};console.log("Start");var x = http.request(options,function(res){ console.log("Connected"); res.on('data',function(data){ console.log(data); });});x.end();


