Javascript 如何使用post参数重定向到外部URL?
当用户到达我的端点时,它必须被重定向到带有URL编码表单参数的外部URLJavascript 如何使用post参数重定向到外部URL?,javascript,node.js,express,url-redirection,http-redirect,Javascript,Node.js,Express,Url Redirection,Http Redirect,当用户到达我的端点时,它必须被重定向到带有URL编码表单参数的外部URL app.get('/', (req, res) => res.redirect(302,'https://example.com')) 终点 形状参数 名称:测试, 身份证号码:123456 这就是我现在在Express中尝试的。它被重定向到URL,但我不知道如何添加参数 app.get('/', (req, res) => res.redirect(302,'https://example.com'))
app.get('/', (req, res) => res.redirect(302,'https://example.com'))
终点
形状参数
名称:测试,
身份证号码:123456
这就是我现在在Express中尝试的。它被重定向到URL,但我不知道如何添加参数
app.get('/', (req, res) => res.redirect(302,'https://example.com'))
不能将参数作为POT请求重定向 您有两种选择:
res.render
,并通过查看引擎u use使用以下内容
示例:res.render('index',{parameterOne:xxx})