我的代码是:
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
manager.requestSerializer = [AFJSONRequestSerializer serializer];
manager.responseSerializer = [AFJSONResponseSerializer serializer];
manager.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", @"text/html",nil];
[manager.requestSerializer setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
我收到了错误:
不可接受的内容类型:application / xml