值
一个 RequestRedirect 枚举值,可以是以下字符串之一:
followerrormanual
如果在创建请求时未指定,则默认为 follow。
示例
在下面的代码片段中,我们使用 Request() 构造函数创建一个新请求(针对脚本所在目录中的一个图像文件),然后将请求的 redirect 值保存在一个变量中:
js
const myRequest = new Request("flowers.jpg");
const myCred = myRequest.redirect;
规范
| 规范 |
|---|
| Fetch # ref-for-dom-request-redirect② |
浏览器兼容性
加载中…