ASIHTTPRequest - HTTPS

Posted by Tejaswi Yerukalapudi on Stack Overflow See other posts from Stack Overflow or by Tejaswi Yerukalapudi
Published on 2010-04-28T14:51:34Z Indexed on 2010/04/28 14:53 UTC
Read the original article Hit count: 408

Filed under:
|

Does ASIHTTPRequest support HTTPS connections? My connection right now works for a HTTP connection and errors if I try a HTTPS Connection. (Goes into requestFailed and gives me a ASIHTTPErrorRequestDomain)

-(void) getPatientsList
{

av.hidden = NO;
[av startAnimating];

NSString *urlString = [IP stringByAppendingString:@"Method1"];
NSURL *url = [NSURL URLWithString:urlString];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
NSLog(@"URL = %@",url);
[request setRequestMethod:@"POST"];
[request setPostValue:@"val1" forKey:@"key1"];
[request setPostValue:@"val2" forKey:@"key2"];
[request setDelegate:self];
[request startAsynchronous];    
}

- (void)requestFinished:(ASIHTTPRequest *)request
{
    // Use when fetching text data
    //NSString *responseString = [request responseString];

    // Use when fetching binary data
    NSData *responseData = [request responseData];
    [self parsePatients:responseData];

    [av stopAnimating];
    av.hidden = YES;
}


- (void)requestFailed:(ASIHTTPRequest *)request
{
    NSError *error = [request error];
    [av stopAnimating];     
    av.hidden = YES;
}

Thanks,
Teja

© Stack Overflow or respective owner

Related posts about iphone

Related posts about asihttprequest