Skip to content

Commit 2779e5c

Browse files
committed
Update docs.
1 parent 1140672 commit 2779e5c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/api/redirect.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The redirect methods are used to redirect the context (request) to a different U
1515
Redirects to the URL derived from the specified path, with a specified [status](#status), a positive integer that corresponds to an HTTP status code.
1616

1717
:::info
18-
If **not** specified, status defaults to **302 Found**.
18+
If **not** specified, status defaults to **303 See Other**.
1919
:::
2020

2121
```go title="Signature"
@@ -24,7 +24,7 @@ func (r *Redirect) To(location string) error
2424

2525
```go title="Example"
2626
app.Get("/coffee", func(c fiber.Ctx) error {
27-
// => HTTP - GET 301 /teapot
27+
// => HTTP - GET 301 /teapot
2828
return c.Redirect().Status(fiber.StatusMovedPermanently).To("/teapot")
2929
})
3030

@@ -35,11 +35,11 @@ app.Get("/teapot", func(c fiber.Ctx) error {
3535

3636
```go title="More examples"
3737
app.Get("/", func(c fiber.Ctx) error {
38-
// => HTTP - GET 302 /foo/bar
38+
// => HTTP - GET 303 /foo/bar
3939
return c.Redirect().To("/foo/bar")
40-
// => HTTP - GET 302 ../login
40+
// => HTTP - GET 303 ../login
4141
return c.Redirect().To("../login")
42-
// => HTTP - GET 302 http://example.com
42+
// => HTTP - GET 303 http://example.com
4343
return c.Redirect().To("http://example.com")
4444
// => HTTP - GET 301 https://example.com
4545
return c.Redirect().Status(301).To("http://example.com")
@@ -92,7 +92,7 @@ app.Get("/user/:name", func(c fiber.Ctx) error {
9292
Redirects back to the referer URL. It redirects to a fallback URL if the referer header doesn't exist, with a specified status, a positive integer that corresponds to an HTTP status code.
9393

9494
:::info
95-
If **not** specified, status defaults to **302 Found**.
95+
If **not** specified, status defaults to **303 See Other**.
9696
:::
9797

9898
```go title="Signature"
@@ -134,7 +134,7 @@ func (r *Redirect) Status(status int) *Redirect
134134

135135
```go title="Example"
136136
app.Get("/coffee", func(c fiber.Ctx) error {
137-
// => HTTP - GET 301 /teapot
137+
// => HTTP - GET 301 /teapot
138138
return c.Redirect().Status(fiber.StatusMovedPermanently).To("/teapot")
139139
})
140140
```

0 commit comments

Comments
 (0)