语言构成

README

AFNetworking is a delightful networking library for iOS, macOS, watchOS, and tvOS. It's built on top of the Foundation URL Loading System, extending the powerful high-level networking abstractions built into Cocoa. It has a modular architecture with well-designed, feature-rich APIs that are a joy to use.

Perhaps the most important feature of all, however, is the amazing community of developers who use and contribute to AFNetworking every day. AFNetworking powers some of the most popular and critically-acclaimed apps on the iPhone, iPad, and Mac.

Choose AFNetworking for your next project, or migrate over your existing projects—you'll be happy you did!

Programming in Swift? Try Alamofire for a more conventional set of APIs.

Architecture

NSURLSession

AFURLSessionManager

AFHTTPSessionManager

Serialization

<AFURLRequestSerialization>

AFHTTPRequestSerializer

AFJSONRequestSerializer

AFPropertyListRequestSerializer

<AFURLResponseSerialization>

AFHTTPResponseSerializer

AFJSONResponseSerializer

AFXMLParserResponseSerializer

AFXMLDocumentResponseSerializer(macOS)

AFPropertyListResponseSerializer

AFImageResponseSerializer

AFCompoundResponseSerializer

Additional Functionality

AFSecurityPolicy

AFNetworkReachabilityManager

Usage

AFURLSessionManager

AFURLSessionManager creates and manages an NSURLSession object based on a specified NSURLSessionConfiguration object, which conforms to <NSURLSessionTaskDelegate>, <NSURLSessionDataDelegate>, <NSURLSessionDownloadDelegate>, and <NSURLSessionDelegate>.

Security Disclosure

If you believe you have identified a security vulnerability with AFNetworking, you should report it as soon as possible via email to security@alamofire.org. Please do not post it to a public issue tracker.

License

AFNetworking is released under the MIT license. See LICENSE for details.