HttpClient - 支持 gzip
向现有代码库添加 gzip 支持是否容易?这是一个基于字符串 (JSON) 的 API,客户端只需发出请求并解析返回的 JSON 数据。如果我可以为此添加 gzip 支持,那就太好了。
我正在使用 HttpClient 4.x
Is it easy to add gzip support to an existing codebase? This is a string based (JSON) API, where the client just makes a requests and parses the JSON data returned. It'd be great if I could add gzip support to this.
I'm using HttpClient 4.x
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
HttpClient 示例之一展示了如何执行此操作:请参阅自定义协议拦截器。
One of the HttpClient examples shows how to do this : see custom protocol interceptors.