当用户提交 application/x-www-form-urlencoded 的表单并且我的网页收到它时,它会将用户重定向到另一个 url。问题是网络浏览器不会再次将 application/x-www-form-urlencoded 发送到新的 url。
有没有办法强制浏览器再次发送 application/x-www-form-urlencoded ?
function redirectTo(request, response, site){
try {
response.writeHead('302', {'Location': site});
console.log("redirecting to " + site);
}
} catch(ex) {
// the headers were already sent - we can't redirect them
console.error("Failed to send redirect", ex);
}
response.end();
}
这是代码。