开发者

iPhone ASIHTTPRequest supports https?

开发者 https://www.devze.com 2022-12-09 01:28 出处:网络
Does the iPhone librarby ASIHTTPRequest supports https开发者_运维问答 protocol? Thank youAccording to the comments for initWithURL:

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

精彩评论

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