我知道可以将post请求重定向到另一个url,如下所示:
app.post((req, res) => {
res.redirect(307, 'https://something.com/api/test');
})
this will send the body also to something.com/api/test. What I want to do is:
app.post((req, res) => {
req.body.something = 'somevalue'; // this value is not added.
res.redirect(307, 'https://something.com/api/test');
})
是否可以修改正文并将其转发到重定向url?
谢谢你的帮助。
1条答案
按热度按时间6tdlim6h1#