ASIHTTPRequest数据压缩

本文转载至  http://blog.csdn.net/zhuoyuetec/article/details/18216439

 

 allowCompressedResponse 设置为YES时,ASIHTTPRequest将向request中增加一个Accept-Encoding头,表示我们可以接收gzip压缩过的数据

 shouldCompressRequestBody 为YES来使你的程序压缩POST/PUT的内容,默认值为NO

 调用responseData 或者responseString 将会得到解压缩后的数据。可以通过调用rawResponseData来获得原始未压缩的数据

posted @ 2014-12-24 12:41  天牛  阅读(112)  评论(0编辑  收藏  举报