1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 18:07:01 +00:00

add a new 'Context.GzipReader(bool) method and 'iris.GzipReader' middleware as requested at #1528

Former-commit-id: 7665545069bf1784d17a9db1e5f9f5f8df4b0c43
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-05-28 19:29:14 +03:00
parent 9e5672da25
commit 1079bb8f8b
8 changed files with 191 additions and 5 deletions

10
iris.go
View File

@@ -453,6 +453,16 @@ var (
//
// A shortcut for the `context#Gzip`.
Gzip = context.Gzip
// GzipReader is a middleware which enables gzip decompression,
// when client sends gzip compressed data.
//
// Similar to: func(ctx iris.Context) {
// ctx.GzipReader(true)
// ctx.Next()
// }
//
// A shortcut for the `context#GzipReader`.
GzipReader = context.GzipReader
// FromStd converts native http.Handler, http.HandlerFunc & func(w, r, next) to context.Handler.
//
// Supported form types: