【发布时间】:2018-12-07 12:01:12
【问题描述】:
我正在 Node.js 上构建一个 ExpressJS Web 应用程序。
我有一个通过 GET 路由呈现的页面:“http://localhost:3000/items/showItemList?status=0”。
此页面调用 POST:“http://localhost:3000/items/approve”。
在 POST 路由中,我想获取指向原始页面“http://localhost:3000/items/showItemList?status=0”的 URL 的 URL。
router.post('/approve', async function(req, res, next) {
// How to get the Url to the originating page.
});
【问题讨论】:
-
当 POST 被触发回到 GET 路由时,你的意思是像重定向一样吗?
标签: javascript node.js express