最新消息: 电脑我帮您提供丰富的电脑知识,编程学习,软件下载,win7系统下载。

返回里面的值.then()[复制]

IT培训 admin 5浏览 0评论

返回里面的值.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()。

返回里面的值.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)

  1. 暂无评论