一、Error Domain=NSURLErrorDomain Code=-1002 "不支持的 URL" UserInfo={NSUnderlyingError=0xb128320 {Error Domain=kCFErrorDomainCFNetwork Code=-1002 "不支持的 URL" UserInfo={NSLocalizedDescription=不支持的 URL}}, NSLocalizedDescription=不支持的 URL}
解决方法:

二、Error Domain=NSCocoaErrorDomain Code=3840 "JSON text did not start with array or object and option to allow fragments not set." UserInfo={NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.}
解决方法:

三、Error Domain=AFNetworkingErrorDomain Code=-1016 "Request failed: unacceptable content-type: text/json" UserInfo={NSErrorFailingURLKey=http://www.baidu.com/post.do, AFNetworkingOperationFailingURLResponseErrorKey={ URL: http://www.baidu.com/post.do } { status code: 200, headers {
"Access-Control-Allow-Credentials" = true;
"Access-Control-Allow-Headers" = "X-Requested-With";
"Access-Control-Allow-Methods" = "GET,POST";
"Access-Control-Allow-Origin" = "*";
Connection = "keep-alive";
"Content-Length" = 1514;
"Content-Type" = "text/json;charset=UTF-8";
Date = "Sat, 09 Jan 2016 09:40:32 GMT";
Server = "nginx/1.6.2";
} }, NSLocalizedDescription=Request failed: unacceptable content-type: text/json}
解决方法:

四、-9802
解决方法:

五、-1012
解决方法:


// AFSecurityPolicy *securityPolicy = [AFSecurityPolicy defaultPolicy];
// securityPolicy.allowInvalidCertificates = YES;
// manger.securityPolicy = securityPolicy;
#import<SystemConfiguration/SystemConfiguration.h>
#import<MobileCoreServices/MobileCoreServices.h>
#define AFNETWORKING_ALLOW_INVALID_SSL_CERTIFICATES
站在巨人的肩膀上才有这些总结
菜鸟走向大牛,大家共同前进,如果觉得不错,请给个赞/关注。
一起交流学习,有问题随时欢迎联系,邮箱:383708669@qq.com
网友评论