I have been using AFHTTPClient class' postPath:parameters:success:failure: method. but it always call failure block only. I have been using AFNetworking 0.10 library. Can anyone tell me the possible reasons for this.
following is the code:
NSURL *nsUrl = [NSURL URLWithString:kURLAuthLogin];
AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:nsUrl];
[httpClient postPath:nil parameters:loginParams success:^(AFHTTPRequestOperation *operation, id responseObject) {
NSLog(@"\n\n\n\n\n\n login success \n\n\n\n\n\n");
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"\n\n\n\n\n\n login failed \n\n\n\n\n\n");
}];
There is no any problem with nsUrl or any other variable for sure.
What happened is that your login failed. It would be common sense to
to get the information you are looking for.