Gzip
func main() {
app := iris.New()
app.Use(iris.Compression)
app.Post("/data", handler)
}
func handler(ctx iris.Context) {
response := iris.Map{"name", "kataras"}
ctx.JSON(response)
}func handler(ctx iris.Context) {
ctx.CompressWriter(true)
// [...]
}Last updated
Was this helpful?