[Reading Notes] iOS-ASIHTTPRequest framework ., Iosasi framework
1. install and configure the ASIHTTPRequest framework.
2. synchronous requests.
In the ASIHTTPRequest framework, the HTTP request-related classes include ASIHTTPRequest and ASIFormDataRequest. The most common classes are ASIHTTPRequest and ASIFormDataRequest, which is a subclass of ASIHTTPRequest, you can also upload data. By default, you can use the POST request method or other HTTP request methods. Both of them can be asynchronous or synchronous requests.
1. Implement GET synchronization requests.
To implement GET synchronous requests, use the basic request class ASIHTTPRequest.
2. Implement POST synchronous requests.
Requests that send POST methods use the ASIFormDataReques class for both non-and asynchronous requests, except that they are slightly different.
3. asynchronous requests.
A synchronization request is generally used only in a child thread, but not in the main thread. The user experience of asynchronous requests is better than that of synchronous requests. Therefore, asynchronous requests generally use a lot.
4. Example: The request queue should be.
For the network capability of multi-threaded concurrent requests, ASIHTTPRequest is designed as the NSOperation subclass, and ASINetworkQueue is designed as the NSOperationQueue subclass.
V. Example: Upload a data application.
Reference: iOS network programming and cloud applications-Best Practices