AFNetworking framework Request failed: unacceptable content-type: text/plain問題
// 初始化Manager
AFURLSessionManager *manager = [[AFURLSessionManageralloc] initWithSessionConfiguration:[NSURLSessionConfigurationdefaultSessionConfiguration]];
NSProgress *progress = nil;
// 加入可接愛Server吐回來的資料型態
AFHTTPResponseSerializer *responseSerializer = manager.responseSerializer;
responseSerializer.acceptableContentTypes = [NSSetsetWithObject:@"text/plain"];
參考資料:
https://github.com/AFNetworking/AFNetworking
全站熱搜
留言列表