I have used asihttprequest classes in my app for calling web-api.
But now it's not working in iOS 8.3 as well as in iOS 11+ and already full app was developed so can't change whole asihttprequest
to afnetworking
so I need some solution in asihttprequest
only.
I want to add that when I am calling api using startAsynchronous
it's not working but when I am using startSynchronous
it's working fine but for a while it freezes the app.
Once request sent it's not come back with any response not failed or success.
I am using ASIFormDataRequest to call api like this.
NSString *stringurl=[NSString stringWithFormat:@"%@%@",kBaseUrl,kForgotPasswordAPI];
NSString * encodedUrl = [stringurl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]];
NSURL *url = [NSURL URLWithString:encodedUrl];
requestForgotPassword = [ASIFormDataRequest requestWithURL:url];
[requestForgotPassword setRequestMethod:@"POST"];
[requestForgotPassword setPostValue:@"mobile" forKey:@"environment"];
[requestForgotPassword setPostValue:txtEmailAddress.text forKey:@"email_address"];
[requestForgotPassword setTimeOutSeconds:60];
[requestForgotPassword setDelegate:self];
[requestForgotPassword startAsynchronous];