iOS 使用AFNetworking遇到异常 Request failed: unacceptable content-type: text/html

http://www.jianshu.com/p/4bfcae659a44

AFHTTPSessionManager * manager = [AFHTTPSessionManager manager];

            manager.requestSerializer= [AFHTTPRequestSerializer serializer];

            [manager GET:accessUrlStr parameters:nil progress:^(NSProgress * _Nonnull downloadProgress) {

                

            } success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {

 

 

           } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {

                SXLog(@"获取access_token时出错 = %@", error);

            }];

posted @ 2016-12-07 15:19  Ruby_c  阅读(265)  评论(0编辑  收藏  举报