#import "AFHTTPSessionManager.h"
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; [manager GET:@"http://ods5pg0qp.bkt.clouddn.com/mysqlconsole/mysqlconsole.json" parameters:nil progress:^(NSProgress * _Nonnull downloadProgress) { }success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { NSLog(@"这里打印请求成功要做的事 %@",responseObject); NSDictionary *d = responseObject; NSLog(@"%@,%@",d[@"versionCode"],d[@"versionName"]); }failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { NSLog(@"%@",error); //这里打印错误信息 }];