I am trying to call web service with the help of ASIHTTPREQUEST, now when webservice called it will directly go in to the RequestFailed.
Below is code with which I call the request:
-(void)Submit_Called_For_LoginApi
{
ASIFormDataRequest *request1;
request1 = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",STR_URL_login]]];
request1.timeOutSeconds = 140;
[request1 setPostValue:self.txtEmail.text forKey:@"email"];
[request1 setPostValue:self.txtPassword.text forKey:@"password"];
[request1 setPostValue:@"1" forKey:@"device_type"];
NSLog(@"STR_URL_login email= %@, password=%@, device_token=%@, device_type=1",self.txtEmail.text,self.txtPassword.text);
[request1 setDidFinishSelector:@selector(requestFinished_login:)];
[request1 setDidFailSelector:@selector(requestFailed_login:)];
[request1 setDelegate:self];
[request1 startAsynchronous];
//[request1 startSynchronous];
}
and here is my requestFailed_login
- (void)requestFailed_login:(ASIHTTPRequest *)request
{
NSLog(@"Request Failed %@",[request responseString]);
[SVProgressHUD dismiss];
[appDel UnknownError];
return;
}
now my problem is still its not going inside RequestFinished. What i need to do to solved this problem ? what should i need to do to solve this error or problem.?