Note that there are some explanatory texts on larger screens.

plurals
  1. POASIHTTPRequest Authentication
    primarykey
    data
    text
    <p>I have discovered <a href="http://allseeing-i.com/ASIHTTPRequest/How-to-use#handling_http_authentication" rel="nofollow noreferrer">ASIHTTPRequest</a> a few days ago and I'm now blocked on a thing. I would like to authenticate my self on an https address (<a href="https://user:pwd@api.domain.com/0.1/userCom/?apikey=12432" rel="nofollow noreferrer">https://user:pwd@api.domain.com/0.1/userCom/?apikey=12432</a> )</p> <p>I try this code :</p> <pre><code> NSURL *url = [NSURL URLWithString:@"https://api.domain.com/0.1/userCom/?apikey=12432"]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; [request setDelegate:self]; [request setUsername:@"myUserName"]; [request setPassword:@"myPassword"]; [request startAsynchronous]; </code></pre> <p>And I've implemented the delegate methods </p> <pre><code>-(void)requestFailed:(ASIHTTPRequest *)request { NSError *error = [request error]; NSLog(@"Failed %@ with code %d and with userInfo %@",[error domain],[error code],[error userInfo]); } -(void)requestFinished:(ASIHTTPRequest *)request { NSLog(@"Finished : %@",[request responseString]); } </code></pre> <p>When I launch my application the requestFailed method is directly called and I have this message :</p> <pre><code>Failed ASIHTTPRequestErrorDomain with code 1 and with userInfo { NSLocalizedDescription = "A connection failure occurred: SSL problem (possibly a bad/expired/self-signed certificate)"; NSUnderlyingError = "Error Domain=NSOSStatusErrorDomain Code=-9807 \"The operation couldn\U2019t be completed. (OSStatus error -9807.)\" UserInfo=0x680fbf0 {}";</code></pre> <p>Have got an idea to resolve this problem ? Thanks a lot !</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload