Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新增gzip压缩请求body功能 #234

Closed
guonaihong opened this issue Jun 22, 2020 · 0 comments
Closed

新增gzip压缩请求body功能 #234

guonaihong opened this issue Jun 22, 2020 · 0 comments
Labels

Comments

@guonaihong
Copy link
Owner

guonaihong commented Jun 22, 2020

目的

使用gzip函数压缩http request流量。

引入中间件设计

保持核心的精简

import (
        "github.com/antlabs/gout-middleware/request"
        "github.com/guonaihong/gout"
)

func main() {
        gout.POST(":6666/compress").
                RequestUse(request.GzipCompress()).
                SetBody("hello world").
                Do()
}
@guonaihong guonaihong changed the title 新增gzip压缩函数 新增gzip压缩请求body功能 Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant