今天使用AFN测试程序时,返回如下错误

iOS-AFN "Request failed: unacceptable content-type: text/plain"

这是由于AFN默认不支持http返回结果为“text/plain”这种类型所致。

解决办法:

找到AFN框架中的AFURLResponseSerialization.m文件,修改其支持的协议类型即可。

iOS-AFN "Request failed: unacceptable content-type: text/plain"

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2021-10-21
  • 2022-12-23
  • 2021-05-17
  • 2022-12-23
猜你喜欢
  • 2021-06-28
  • 2022-12-23
  • 2022-01-23
  • 2022-12-23
  • 2021-06-27
  • 2022-02-08
  • 2022-12-23
相关资源
相似解决方案