type {( "text/json", "application/json", "text/javascript" )}, got text/html" UserInfo=0x6d7dc80 {NSErrorFailingURLKey=http://10.10.10.109:8090/fruit/index.php/list/fruitlist/?p=1, NSLocalizedDescription=Expected content type {( "text/json", "application/json", "text/javascript" )}, got text/html}, { NSErrorFailingURLKey = "http://10.10.10.109:8090/fruit/index.php/list/fruitlist/?p=1"; NSLocalizedDescription = "Expected content type {(\n \"text/json\",\n \"application/json\",\n \"text/javascript\"\n)}, got text/html"; }
解决办法:请求前加入
[AFJSONRequestOperation addAcceptableContentTypes:[NSSet setWithObject:@"text/html"]];
转载于:https://www.cnblogs.com/cameron/archive/2013/05/30/3108625.html