RedCrazyGhost
RedCrazyGhost
I tested the code you provided and there is no problem. The return value of apifox is normal. Please check the response header! The code logic of gin code is...
Please upgrade to the latest version: github.com/gin-gonic/gin v1.9.1
I checked the relevant functions and submission history. This method is quite old and modifications may have a greater impact. I feel that it is not suitable to modify it...
You should not have structs with circular dependencies. You don't conform to the Single Responsibility Principle.
There is a problem with the execution location of `gin.SetMode` ```go package main import ( "net/http" "github.com/gin-gonic/gin" ) func main() { gin.SetMode(gin.ReleaseMode) g := gin.New() g.GET("/", func(c *gin.Context) { c.JSON(http.StatusOK,"ok")...
The code you provided cannot be reproduced, please provide the code again
This requires you to handle the client-side and server-side code yourself. The data has been compressed during network transmission. This issue can be moved to https://github.com/gin-gonic/contrib for questioning https://github.com/rickb777/servefiles Maybe...
There's something wrong with your usage. gin does not currently support fasthttp Reference [Add support for fasthttp or fasthttprouter #498](https://github.com/gin-gonic/gin/issues/498) ```diff - if err := fasthttp.ListenAndServe(":8080", fasthttpadaptor.NewFastHTTPHandler(engine)); err != nil...
go mod get pkg is the latest version, do not need to carry the @latest suffix, if you want to specify the version, please specify the specific version number, such...
Try manual flush ```golang package main import ( "net/http" "github.com/gin-gonic/gin" ) func main() { app := gin.New() app.UseH2C = true app.POST("/*path", func(c *gin.Context) { c.Header("Trailer", "my-status") c.Status(http.StatusOK) c.Writer.Flush() c.Header("my-status", "OK")...