IOS AFN (third-party request)

Source: Internet
Author: User


What is AFN
The full name is afnetworking, is a layer of nsurlconnection, nsurlsession package
Although the operating efficiency is not ASI high, but the use is simpler than the ASI
In the development of iOS, the use of more extensive

AFN's GitHub Address
Https://github.com/AFNetworking/AFNetworking

Version

for iOS version

Xcode requirements

2.0+

IOS 6.0+

Xcode 5.0+

1.x

IOS 5.0

0.10.x

IOS 4.3


Afhttprequestoperationmanager
is one of the most important objects in AFN .
Encapsulates the common processing of HTTP requests
Get\post Request
Parsing the server's response data

Create
Afhttprequestoperationmanager *mgr = [Afhttprequestoperationmanager manager];

GET Request-(Afhttprequestoperation *) GET: (NSString *) urlstring parameters: (ID) Parameters success: (void(^) (Afhttprequestoperation *operation,IDresponseobject)) Success Failure: (void(^) (Afhttprequestoperation *operation, Nserror *error)) FailurePOST request -(Afhttprequestoperation *) POST: (NSString *) urlstring parameters: (ID) Parameters success: (void(^) (Afhttprequestoperation *operation,IDresponseobject)) Success Failure: (void(^) (Afhttprequestoperation *operation, Nserror *error)) Failure

IOS AFN (third-party request)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.