You may encounter the following error when using afnetworking:
{status code:200, headers {
"Content-length" =;
"Content-type" = "text/plain;charset=utf-8";
Date = "Thu, 10:37:50 GMT";
Server = "apache-coyote/1.1";
"Set-cookie" = "JSESSIONID=C0DFED60A154557F8386E62AB2A066CE; Path=/fhjrdt ";
}}, Nslocalizeddescription=request failed:unacceptable Content-type:text/plain}
At this time need to modify afnetworking can receive Content-type, go to afnetworking Source code directory to find AFURLRESPONSESERIALIZATION.M file will inside the code:
Self.acceptablecontenttypes =[nssetsetwithobjects:@ "Application/json", @ "Text/json", @ "Text/javascript", nil];
Modified to:
Self.acceptablecontenttypes =[nssetsetwithobjects:@ "Application/json", @ "Text/json", @ "Text/javascript", @ "text/ HTML ", nil];
Self.acceptablecontenttypes =[nssetsetwithobjects:@ "Application/json", @ "Text/json", @ "text/javascript", @ "Text/plain", nil];
Modify the afnetworking source file to receive Text/plain and Text/html methods