AFJSONRequestOperation报错Expected content type

错误类似于

"Expected content type {( "text/javascript", "application/json", "text/json" )}, got text/html"

这是没有指定请求期望的字符集,需要调用

[AFJSONRequestOperation addAcceptableContentTypes:[NSSetsetWithObjects:@"application/json", @"text/html", nil]]; 即可


原文地址:https://www.cnblogs.com/dyllove98/p/3125003.html