AFJSONRequestOperation报错Expected content type

错误类似于

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

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

 

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


posted @ 2013-06-07 20:04  jlins  阅读(382)  评论(0编辑  收藏  举报