I am using AFNetworking library to post data on server using POST method.
Following is my code
- (void) callLoginAPI:(NSDictionary *)dictProfile{
The problem comes from response parsing.
You are trying to de-serialize a JSON
reponse (which MUST be contained in either a NSArray
or NSDictionary
) however your response is none of the above (Most likely a simple string).
Also, try to set the "allow fragments" to the response serializer.
AFJSONResponseSerializer *responseSerializer = [AFJSONResponseSerializer serializerWithReadingOptions:NSJSONReadingAllowFragments];