Skip to content

Commit 2061797

Browse files
author
Jake Champion
committed
chore: add Response.redirect documentation
1 parent 65eeae9 commit 2061797

File tree

7 files changed

+138714
-0
lines changed

7 files changed

+138714
-0
lines changed

documentation/app/fastly.toml

Lines changed: 138504 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
8+
# Response.redirect()
9+
10+
The **`redirect()`** static method of the `Response` interface returns a `Response` resulting in a redirect to the specified URL.
11+
12+
## Syntax
13+
14+
```js
15+
Response.redirect(url)
16+
Response.redirect(url, status)
17+
```
18+
19+
### Parameters
20+
21+
- `url`
22+
- : The URL that the new response is to originate from.
23+
- `status` __optional__
24+
- : An optional status code for the response (e.g., `302`.)
25+
26+
### Return value
27+
28+
A `Response` object.
29+
30+
### Exceptions
31+
32+
- `RangeError`
33+
- : The specified status is not a redirect status.
34+
- `TypeError`
35+
- : The specified URL is invalid.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
8+
# Response.redirect()
9+
10+
The **`redirect()`** static method of the `Response` interface returns a `Response` resulting in a redirect to the specified URL.
11+
12+
## Syntax
13+
14+
```js
15+
Response.redirect(url)
16+
Response.redirect(url, status)
17+
```
18+
19+
### Parameters
20+
21+
- `url`
22+
- : The URL that the new response is to originate from.
23+
- `status` __optional__
24+
- : An optional status code for the response (e.g., `302`.)
25+
26+
### Return value
27+
28+
A `Response` object.
29+
30+
### Exceptions
31+
32+
- `RangeError`
33+
- : The specified status is not a redirect status.
34+
- `TypeError`
35+
- : The specified URL is invalid.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
8+
# Response.redirect()
9+
10+
The **`redirect()`** static method of the `Response` interface returns a `Response` resulting in a redirect to the specified URL.
11+
12+
## Syntax
13+
14+
```js
15+
Response.redirect(url)
16+
Response.redirect(url, status)
17+
```
18+
19+
### Parameters
20+
21+
- `url`
22+
- : The URL that the new response is to originate from.
23+
- `status` __optional__
24+
- : An optional status code for the response (e.g., `302`.)
25+
26+
### Return value
27+
28+
A `Response` object.
29+
30+
### Exceptions
31+
32+
- `RangeError`
33+
- : The specified status is not a redirect status.
34+
- `TypeError`
35+
- : The specified URL is invalid.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
8+
# Response.redirect()
9+
10+
The **`redirect()`** static method of the `Response` interface returns a `Response` resulting in a redirect to the specified URL.
11+
12+
## Syntax
13+
14+
```js
15+
Response.redirect(url)
16+
Response.redirect(url, status)
17+
```
18+
19+
### Parameters
20+
21+
- `url`
22+
- : The URL that the new response is to originate from.
23+
- `status` __optional__
24+
- : An optional status code for the response (e.g., `302`.)
25+
26+
### Return value
27+
28+
A `Response` object.
29+
30+
### Exceptions
31+
32+
- `RangeError`
33+
- : The specified status is not a redirect status.
34+
- `TypeError`
35+
- : The specified URL is invalid.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
8+
# Response.redirect()
9+
10+
The **`redirect()`** static method of the `Response` interface returns a `Response` resulting in a redirect to the specified URL.
11+
12+
## Syntax
13+
14+
```js
15+
Response.redirect(url)
16+
Response.redirect(url, status)
17+
```
18+
19+
### Parameters
20+
21+
- `url`
22+
- : The URL that the new response is to originate from.
23+
- `status` __optional__
24+
- : An optional status code for the response (e.g., `302`.)
25+
26+
### Return value
27+
28+
A `Response` object.
29+
30+
### Exceptions
31+
32+
- `RangeError`
33+
- : The specified status is not a redirect status.
34+
- `TypeError`
35+
- : The specified URL is invalid.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
8+
# Response.redirect()
9+
10+
The **`redirect()`** static method of the `Response` interface returns a `Response` resulting in a redirect to the specified URL.
11+
12+
## Syntax
13+
14+
```js
15+
Response.redirect(url)
16+
Response.redirect(url, status)
17+
```
18+
19+
### Parameters
20+
21+
- `url`
22+
- : The URL that the new response is to originate from.
23+
- `status` __optional__
24+
- : An optional status code for the response (e.g., `302`.)
25+
26+
### Return value
27+
28+
A `Response` object.
29+
30+
### Exceptions
31+
32+
- `RangeError`
33+
- : The specified status is not a redirect status.
34+
- `TypeError`
35+
- : The specified URL is invalid.

0 commit comments

Comments
 (0)