我将以下JSON字符串发送到我的服务器.
(
{
id = 1;
name = foo;
},
{
id = 2;
name = bar;
}
)
Run Code Online (Sandbox Code Playgroud)
在服务器上我有这个.
app.post('/', function(request, response) {
console.log("Got response: " + response.statusCode);
response.on('data', function(chunk) {
queryResponse+=chunk;
console.log('data');
});
response.on('end', function(){
console.log('end');
});
});
Run Code Online (Sandbox Code Playgroud)
当我发送字符串时,它显示我得到了200响应,但其他两种方法从未运行.这是为什么?