HttpClient - 支持 gzip

发布于 2024-09-06 03:34:01 字数 128 浏览 4 评论 0原文

向现有代码库添加 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

墟烟 2024-09-13 03:34:01

HttpClient 示例之一展示了如何执行此操作:请参阅自定义协议拦截器。

One of the HttpClient examples shows how to do this : see custom protocol interceptors.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文