AFHTTPRequestOperationManager *manager = [[AFHTTPRequestOperationManager alloc] initWithBaseURL:baseURL];
manager.responseSerializer = [AFJSONResponseSerializer serializer];
manager.requestSerializer = [AFHTTPRequestSerializer serializer];
manager.requestSerializer.timeoutInterval = 10;
manager.securityPolicy.allowInvalidCertificates = YES;
manager.responseSerializer.acceptableContentTypes =[NSSet setWithObjects:@"text/html", @"text/plain",nil];
manager.securityPolicy.allowInvalidCertificates = YES;
manager.securityPolicy.validatesDomainName = NO;
设置了以上代码并没有卵用,请问如何解决这个问题?一直报
error:Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn ’ t be completed. (Cocoa error 3840.)" (JSON text did not start with array or object and option to allow fragments not set.) UserInfo=0x7fbf6a48a850 {NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.}
1
dorentus 2015-11-06 10:29:25 +08:00 via iPhone
你这个错误是 JSON 解析失败吧
|