You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expected gzip and deflate and other types to be automatically handed, for some reason, or at least have a common middleware that would handle this. Is this not the case?
How to reproduce
package main
import (
"github.com/gin-gonic/gin"
)
func main() {
g := gin.Default()
g.POST("/json", func(c *gin.Context) {
var messages []string
if err := c.ShouldBindJSON(&messages); err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
return
}
})
g.Run(":9000")
}
And now send it compressed requests.
Expectations
I should be able to send compressed data and have it automatically uncompressed.
Actual result
Environment
go version: 1.22.2
gin version (or commit ref): github.com/gin-gonic/gin v1.9.1
operating system: linux, Darwin
The text was updated successfully, but these errors were encountered:
Description
I expected gzip and deflate and other types to be automatically handed, for some reason, or at least have a common middleware that would handle this. Is this not the case?
How to reproduce
And now send it compressed requests.
Expectations
I should be able to send compressed data and have it automatically uncompressed.
Actual result
Environment
The text was updated successfully, but these errors were encountered: