-
Notifications
You must be signed in to change notification settings - Fork 114
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
识别response中的content-encoding #343
Comments
可以实现下。 如果是透明转发的场景,自动解码不一样是最优的方式,目前比较倾向来个开关控制下,伪代码如下。 .AutoDecodeBody() //加这样的接口
s := ""
gout.GET(url).AutoDecodeBody().BindBody(&s).Do()
// 这样如果可以要解压之后的内容就调用下AutoDecodeBody,如果要原始的压缩内容就不调用这个接口 |
备忘:这个issue完成了。在测试的时候发现,net/http里面已经做了gzip自动解码的动作,源代码位于 /~https://github.com/golang/go/blob/master/src/net/http/transport.go#L2211 |
Merged
有机会玩下v0.3.2版本,这个issue暂时关闭了。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
content-encoding会指定response body的压缩方法,希望可以支持自动识别常用的压缩,gzip, deflate, br等,相信这是一个比较common的部分
The text was updated successfully, but these errors were encountered: