The ASIHTTPRequest framework is an excellent third party OBJECTIVE-C HTTP framework that supports HTTP development under Mac OS X and iOS. The technical Support website is http://allseeing-i.com/ASIHTTPRequest/. Has the following advantages:
Support for downloading data in memory or local files
Easy access to request and answer HTTP headers
Support Cookies
Support for GZIP requests or responses
Support Caching
Support for synchronous or asynchronous requests
Support HTTPS
But the ASIHTTPRequest framework does not support arc, which is a bit of a hassle if you develop configuration under arc. The examples we present in this chapter are based on the development under arc.
Installing and configuring the ASIHTTPRequest framework
First download address https://github.com/pokeb/asi-http-request/tree, download complete open asi-http-request directory, select files to add to our iOS project.
Then we also need to add some supported class libraries or frameworks for the project, which include:
Cfnetwork.framework
Systemconfiguration.framework
Mobilecoreservices.framework
Coregraphics.framework
Libz.dylib
Select the project's targets (number ①), select Build phases (number ②), and then select the number ③, pop-up dialog box, in the dialog box to select the above frame or class library. Finally click the Add button shown in the number ④.