Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add a redirect sample for POST method #124

Merged
merged 1 commit into from May 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions content/en/docs/examples/redirects.md
Expand Up @@ -11,6 +11,13 @@ r.GET("/test", func(c *gin.Context) {
})
```

Issuing a HTTP redirect from POST. Refer to issue: [#444](https://github.com/gin-gonic/gin/issues/444)

```go
r.POST("/test", func(c *gin.Context) {
c.Redirect(http.StatusFound, "/foo")
})
```

Issuing a Router redirect, use `HandleContext` like below.

Expand Down
7 changes: 7 additions & 0 deletions content/ja/docs/examples/redirects.md
Expand Up @@ -11,6 +11,13 @@ r.GET("/test", func(c *gin.Context) {
})
```

Issuing a HTTP redirect from POST. Refer to issue: [#444](https://github.com/gin-gonic/gin/issues/444)

```go
r.POST("/test", func(c *gin.Context) {
c.Redirect(http.StatusFound, "/foo")
})
```

Router でリダイレクトするには、下記のように `HandleContext` メソッドを使ってください。

Expand Down
7 changes: 7 additions & 0 deletions content/ko-kr/docs/examples/redirects.md
Expand Up @@ -11,6 +11,13 @@ r.GET("/test", func(c *gin.Context) {
})
```

Issuing a HTTP redirect from POST. Refer to issue: [#444](https://github.com/gin-gonic/gin/issues/444)

```go
r.POST("/test", func(c *gin.Context) {
c.Redirect(http.StatusFound, "/foo")
})
```

라우터 리다이렉트를 실행하려면, 아래와 같이 `HandleContext`를 사용하세요.

Expand Down
7 changes: 7 additions & 0 deletions content/zh-cn/docs/examples/redirects.md
Expand Up @@ -11,6 +11,13 @@ r.GET("/test", func(c *gin.Context) {
})
```

Issuing a HTTP redirect from POST. Refer to issue: [#444](https://github.com/gin-gonic/gin/issues/444)

```go
r.POST("/test", func(c *gin.Context) {
c.Redirect(http.StatusFound, "/foo")
})
```

路由重定向,使用 `HandleContext`:

Expand Down
7 changes: 7 additions & 0 deletions content/zh-tw/docs/examples/redirects.md
Expand Up @@ -11,6 +11,13 @@ r.GET("/test", func(c *gin.Context) {
})
```

Issuing a HTTP redirect from POST. Refer to issue: [#444](https://github.com/gin-gonic/gin/issues/444)

```go
r.POST("/test", func(c *gin.Context) {
c.Redirect(http.StatusFound, "/foo")
})
```

Issuing a Router redirect, use `HandleContext` like below.

Expand Down