ios8 - AFNetworking says "cannot parse response" -
I am sending a request to the server, which is going to get me on my app though is to handle requests and responsibilities:
can not parse error domain = NSURLErrorDomain code = -1017 "response" UserInfo = 0x167668d0 {NSErrorFailingURLStringKey = https: // ***, _kCFStreamErrorCodeKey = -1, NSErrorFailingURLKey = https: / / *** /, NSLocalizedDescription = response can not parse, _kCFStreamErrorDomainKey = 4, NSUnderlyingError = 0x16731990 "response could not parse"
the http request Accepting the field is enough.
I can not even see when the message is coming, because the NSHTPRRPSpoint object is empty.
What can be an issue and how can I see how a message that is not using things like wired shark is coming. / P>
Thanks!
[request setHTTPBody: [postString dataUsingEncoding: NSUTF8StringEncoding]];
When I execute the request with the I GET method, it will report the error.
My solution when API to GET method is required, parameters must be added to the URL, such as http: // apiserver / api? So ParamName = paramValue
, the API method is POST , set HTTPBody to use the above code, the request object.
Comments
Post a Comment