我真的无法弄清楚我做错了什么。我花了大约半个小时查看这段代码并重新阅读基本上做同样事情并且有效的代码。永远不会触发“数据”事件和相应的回调。
var http = require("http");
http.createServer(function(request, response){
response.writeHead(200);
console.log('Executing');
request.on('data', function(chunk){
console.log('data being read');
console.log(chunk.toString());
});
request.on('end', function(){
console.log('done');
response.end();
});
}).listen(8080);
请帮忙