AFNetworking
来源:互联网 发布:linux rpm安装java 编辑:程序博客网 时间:2024/05/23 19:39
AFNetworking is a delightful networking library for iOS and Mac OS X. It's built on top of the Foundation URL Loading System. 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.
AFNetworking is based on NSURLSession. If you want to know about NSURLSession click http://blog.csdn.net/djl4104804/article/details/22667273 ( difference of NSURLSession and NSURLConnection )
AFNetworking can download, upload (for mute-part Request, with progress) ,network state detection...(more...)
first the download task
NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration]; NSURL *URL = [NSURL URLWithString:@"http://www.baidu.com"]; NSURLRequest *request = [NSURLRequest requestWithURL:URL]; NSURLSessionDataTask *dataTask = [manager dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { if (error) { NSLog(@"Error: %@", error); } else { NSLog(@"%@ %@", response, responseObject); } }]; [dataTask resume];//resume tesk if it is suspendedI will update AFNetworking code later one by one. QAQ
- AFNetworking
- AFNetworking
- AFNetworking
- AFNetworking
- AFNetworking
- AFNetworking
- AFNetworking
- AFNetworking
- AFNetworking
- afnetworking
- AFNetworking
- AFNetworking
- AFNetworking
- AFNetworking
- AFNetWorking
- AFNetworking
- AFNetworking
- AFNetworking
- spring封装dao和service层
- Android App耗电分析
- Android44_SurfaceView
- linux下socket connect超时设置
- XSD文件详解
- AFNetworking
- jenkins日期时区不对的修改方法
- Opencv学习笔记(六)SURF学习笔记
- Android45_JPush极光推送及ShareSDK
- js DOM节点的创建、插入、删除、查找、替换例子
- iOS新浪微博 微信好友、微信朋友圈、QQ自身sdk分享方法
- c语言中的static
- iOS优秀博客收录
- linux select 多路复用机制