因为上传使用的是AFURLSessionManager ,而AFURLSessionManager默认的responseSerializer是AFURLResponseSerialization,而AFURLResponseSerialization默认是AFJSONResponseSerializer的一个实例,而AFJSONResponseSerializer不支持text/html。
解决方法:重新替换responseSerializer
AFHTTPResponseSerializer *responseSerializer = [AFHTTPResponseSerializer serializer];
responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", @"text/html", @"text/plain", nil];
manager.responseSerializer = responseSerializer;
网友评论