Preface: Before learning the use of nsurlsession, learn a good article about Nsurlsession "from nsurlconnection to Nsurlsession" or a domestic translation "from the Nsurlconnection to Nsurlsession ", or do not have to learn my blog Park notes directly to learn from the nsurlconnection to Nsurlsession" is also possible, this article on the use of nsurlsession has a very detailed discussion. But first of all, this paper briefly introduces the basic of Nsurlsession and base network request use, in case I forget to review the use of????。
Learn Nsurlsessiontask:
With nsurlsession you need to use Nsurlsessiontask, so the relationship between the class of the task and its subclasses is still to be understood:
English blind?? : Session Task Tasks
The main new code knowledge:
Nsurlsession:
-(nsurlsessiondatatask*) datataskwithrequest Create a task based on the request object
-(nsurlsessiondatatask*) Datataskwithurl Create a task based on the requested URL
Nsurlsessiondatatask:
-(void) resume to perform the task
Basic use of code presentation (using Nsurlsessiondatatask):
Code presentation using the Proxy method:
Reprint Note Address: http://www.chengxuyuans.com/iPhone_IOS/97837.html
Ask--One-click Programmer to answer the question artifact, one-man service for cattle, developer Programming Essentials official website: www.wenaaa.com
QQ group 290551701 gathers a lot of Internet elite, technical director, architect, project Manager! Open source technology research, Welcome to the industry, Daniel and beginners are interested in engaging in IT industry personnel to enter!
Basic use of network programming--1 and nsurlsession for iOS development