diff --git a/content/en/docs/examples/redirects.md b/content/en/docs/examples/redirects.md index 0afc2235b..f7d823eca 100644 --- a/content/en/docs/examples/redirects.md +++ b/content/en/docs/examples/redirects.md @@ -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. diff --git a/content/ja/docs/examples/redirects.md b/content/ja/docs/examples/redirects.md index 6766393c0..d1a78bf53 100644 --- a/content/ja/docs/examples/redirects.md +++ b/content/ja/docs/examples/redirects.md @@ -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` メソッドを使ってください。 diff --git a/content/ko-kr/docs/examples/redirects.md b/content/ko-kr/docs/examples/redirects.md index d3c4fba68..7953fb2fd 100644 --- a/content/ko-kr/docs/examples/redirects.md +++ b/content/ko-kr/docs/examples/redirects.md @@ -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`를 사용하세요. diff --git a/content/zh-cn/docs/examples/redirects.md b/content/zh-cn/docs/examples/redirects.md index 88b63a603..0fed66d33 100644 --- a/content/zh-cn/docs/examples/redirects.md +++ b/content/zh-cn/docs/examples/redirects.md @@ -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`: diff --git a/content/zh-tw/docs/examples/redirects.md b/content/zh-tw/docs/examples/redirects.md index 0afc2235b..f7d823eca 100644 --- a/content/zh-tw/docs/examples/redirects.md +++ b/content/zh-tw/docs/examples/redirects.md @@ -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.