iOS BUG : Request failed: unacceptable content-type: application/atom+xml

iOS BUG : Request failed: unacceptable content-type: application/atom+xml

使用AFN框架遇到的bug.

Bug

Error Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptable content-type: application/atom+xml" UserInfo={com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x7f89e9dd5060>

解决办法

AFHTTPSessionManager *mgr =[AFHTTPSessionManager manager];
mgr.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"application/atom+xml"];

你可能感兴趣的:(iOS BUG : Request failed: unacceptable content-type: application/atom+xml)