AFNetworking Enable GZIP

Alan picture Alan · May 7, 2013 · Viewed 10.9k times · Source

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

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

Thanks!

Answer

vbali picture vbali · May 7, 2013

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