superagent使用post服务器端无法接收到数据
传数据
superagent
.post('http://localhost:5100/api/todo')
.send({
id: 1111,
content: 2222,
complete: undefined
})
.end(function(res) {
console.log(res)
})
服务器
app.post('/api/todo', function(req, res, next) {
console.log(req.body, req.query, req.params);
})
结果打印出来就是undefined {} {} 请问是哪里出错了?
3 回复