AFNetworking启用GZIP [英] AFNetworking Enable GZIP

查看:604
本文介绍了AFNetworking启用GZIP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在AFNetworking网站上看到支持GZIP压缩
服务器响应的Gzip解压缩已内置到AFNetworking中,因为NSURLConnection将使用Content-Encoding:gzip HTTP头自动解压缩响应。 - AFNetworking常见问题

I am looking on the AFNetworking site that GZIP compression is supported " Gzip decompression from server responses is already built into AFNetworking, as NSURLConnection will automatically decompress responses with the Content-Encoding: gzip HTTP header. " - AFNetworking FAQ

如何启用GZIP压缩以便我可以从压缩服务器中提取数据,或者它是否已默认为此?

How do I enable GZIP compression so I can pull data from the server compressed or is it already defaulting to this?

谢谢!

推荐答案

AFAIK NSURLConnection 使用gzip decompresson by默认和AFNetworking构建在NSURLConnection的顶部。所以,你不应该启用它。

AFAIK NSURLConnection uses gzip decompresson by default and AFNetworking builds on the top of NSURLConnection. So, you shouldn't have to enable it.

这篇关于AFNetworking启用GZIP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆