iOS网络框架 AFNetworking

分享到:

iOS网络框架 AFNetworking

AFNetworking 是 iOS 一个使用很方便的网络开发框架。示例代码:

NSURL *url = [NSURL URLWithString:@"https://gowalla.com/users/mattt.json"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
NSLog(@"Name: %@ %@", [JSON valueForKeyPath:@"first_name"], [JSON valueForKeyPath:@"last_name"]);
} failure:nil];
[operation start];


项目主页:http://www.open-open.com/lib/view/home/1332641970468

昵    称:
验证码:

相关文档: