返回里面的值.then()[复制]
这个问题在这里已有答案:
- Error: Can't set headers after they are sent to the client 23回答
根据明确的文件,https://expressjs/en/api.html#res,您可以这样做:
.then(response => {
res.send(response).
})
要么
.then(response => {
res.json(response)
})
在此之前,请检查是否必须使用.asPromise()。
与本文相关的文章
评论列表(0)
- 暂无评论