我尝试使用以下方法在 Controller 操作中获取发布数据:
req.body.name
但是不起作用
最佳答案
您可以尝试先检索全部内容来访问它们
function(req, res, next) {
var params = req.params.all();
//then you can access them like this...
console.log(params.name)
}
关于javascript - SailsJS 获取发布的数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24477988/