开发者

iPhone ASIHTTPRequest supports https?

Does the iPhone librarby ASIHTTPRequest supports https开发者_运维问答 protocol?

Thank you


According to the comments for initWithURL:

// Should be an HTTP or HTTPS url, may include username and password if appropriate

So, yes, it should support HTTPS. Although I have not tried it.


HTTPS is supported. I've been using these classes for HTTPS rather extensively lately.


Yes actually, In that case you have to send password and username as shown in the below example.

NSURL *url = [NSURL URLWithString:@"http://allseeing-i.com/top_secret/"];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request setUsername:@"username"];
[request setPassword:@"password"];

More information on the ASIHTTPRequest is found in the following URL :

http://allseeing-i.com/ASIHTTPRequest/How-to-use

EDIT : You can also try :

[request setValidatesSecureCertificate:NO]

Which works for self signed certificates.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜