i am creating an object of AFHTTPRequestOperationManager *manager
NSString *BaseURLString = @"http://192.168.1.202:81//CredentialsModule/CredentialService.asmx/details";
AFHTTPRequestOperationManager *manager=[AFHTTPRequestOperationManager manager];
[manager POST:BaseURLString parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) {
NSLog(@"Success: %@", responseObject);
NSDictionary *jsonDict = (NSDictionary *) responseObject;
NSString *products = [jsonDict objectForKey:@"d"];
NSLog(@"pro %@",products);
NSString *newString = [NSString stringWithFormat:@"%@",products];
NSData* data = [newString dataUsingEncoding:NSUTF8StringEncoding];
NSError* error;
id jsonObjects = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&error];
NSLog(@"user id %@",jsonObjects);
[self.navigationController pushViewController:CategoryViewController animated:YES];
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"\n Error2: %ld",(long)operation.response.statusCode);
NSLog(@"\n Error2: %@", operation.responseString);
}];
suppose i am calling above web service and my session is timeout.So,i want to know is there any chance to identify session timeout before calling the service in afnetworking 2.0. Please don't try to run web service it won't work because its on local server !!