Request: thuộc tính redirect
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2017.
Note: This feature is available in Web Workers.
Thuộc tính chỉ đọc redirect của giao diện Request chứa chế độ xử lý chuyển hướng.
Giá trị
Một giá trị enum RequestRedirect, có thể là một trong các chuỗi sau:
followerrormanual
Nếu không được chỉ định khi request được tạo, nó sẽ nhận giá trị mặc định là follow.
Ví dụ
Trong đoạn mã sau, chúng ta tạo một request mới bằng constructor Request() rồi lưu giá trị redirect của request vào một biến:
js
const myRequest = new Request("flowers.jpg");
const myCred = myRequest.redirect;
Thông số kỹ thuật
| Specification |
|---|
| Fetch> # ref-for-dom-request-redirect②> |