AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
manager.responseSerializer.acceptableContentTypes = [
NSSet
setWithObject:@
"text/html"
];
manager.requestSerializer = [AFJSONRequestSerializer serializer];
manager.responseSerializer = [AFJSONResponseSerializer serializer];
[manager.requestSerializer setValue:@
"application/json"
forHTTPHeaderField:@
"Accept"
];
[manager.requestSerializer setValue:@
"text/html; charset=utf-8"
forHTTPHeaderField:@
"Content-Type"
];
// 此处设置content-Type生效了,然后就是参数要求是json,怎么设。。
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系我们删除。