【发布时间】:2015-11-16 18:52:57
【问题描述】:
后端开发人员要求我将参数或内容类型作为 Application/text 发送,因为 AFnetworking 将参数作为 Form 发送,后端拒绝请求,我尝试将内容类型更改为 Application/text通过以下行但似乎不起作用,
试试 1
[requestSerializer setValue:@"application/text" forHTTPHeaderField:@"Accept"];
试试 2
[requestSerializer setValue:@"application/text" forHTTPHeaderField:@"Content-Type"];
我不知道 AFNETWorking 是否将参数转换为 JSON,但我已经检查它没有发生。
【问题讨论】:
标签: ios web-services afnetworking content-type