Request.redirect可能是
"follow",
"error"或
"manual"。
如果为“ follow”,则fetch()API遵循重定向响应(HTTP状态码= 301,302,303,307,308)。
如果为“错误”,则fetch()API会将重定向响应视为错误。
如果它是“ manual”,则fetch()API不会遵循重定向,并返回一个不透明重定向过滤的响应,该响应包装了重定向响应。
由于您要在提取后重定向,因此只需将其用作
fetch(url, { method: 'POST', redirect: 'follow'}) .then(response => { // HTTP 301 response }) .catch(function(err) { console.info(err + " url: " + url); });


