Redirects

Issuing a HTTP redirect is easy:

r.GET("/test", func(c *gin.Context) {
    c.Redirect(http.StatusMovedPermanently, "http://www.google.com/")
})

Both internal and external locations are supported.

results matching ""

    No results matching ""