实现REST API服务器,在捕获PUT请求时,消息正文为空
服务器:Windows Server Web SP2 IIS:版本7.0.6000.16386 节点v0.8.16 iisnode v0.2.2
测试代码:
var server = http.createServer(function (request, response) {
var data = '';
request.on('data', function (chunk) {
data += chunk;
console.log(data)
});
request.on("end", function(){
response.writeHead(200, { 'Content-Type': 'application/json' });
response.end(data);
});
});