企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
发布HTTP重定向很容易,支持内部和外部链接 ``` r.GET("/test", func(c *gin.Context) { c.Redirect(http.StatusMovedPermanently, "http://www.google.com/") }) ``` Gin路由重定向,使用如下的`HandleContext` ``` r.GET("/test", func(c *gin.Context) { c.Request.URL.Path = "/test2" r.HandleContext(c) }) r.GET("/test2", func(c *gin.Context) { c.JSON(200, gin.H{"hello": "world"}) }) ```