iPhone 3G的ASIHTTPRequest [英] ASIHTTPRequest with iPhone 3G

查看:67
本文介绍了iPhone 3G的ASIHTTPRequest的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的项目中使用了ASIHTTPRequest,但是我遇到了iPhone 3G的问题. 我将请求发送至:

I am using ASIHTTPRequest in my project and i have a problem with iPhone 3G. i send a request to :

NSURL* pageURL = [NSURL URLWithString:@"https://accounts.google.com/ServiceLogin?service=sj"];
loginPageRequest = [[ASIHTTPRequest alloc] initWithURL:pageURL];
[loginPageRequest setTimeOutSeconds:30];
[loginPageRequest setDelegate:self];
[loginPageRequest startAsynchronous];

在其他设备中,我得到了响应:

and in other devices i get a responde to :

- (void)requestFinished:(ASIHTTPRequest *)request

在iPhone 3G中,我有很多次:

and in iPhone 3G i get a lot of times :

- (void)requestFailed:(ASIHTTPRequest *)request

MSG错误:The request timed out

我将请求超时设置为30秒.

i set the the request timeout to 30 seconds.

知道为什么会发生吗?

推荐答案

我在iPhone 3G上也遇到了这个问题! 我发现这是一个HTTP * S *(SSL)问题.我的有效"证书被标记为无效.

I also had this problem on iPhone 3G! I figured out it was a HTTP*S* (SSL) problem. My "valid" certificate was flagged as invalid.

您可以在请求中添加[request setValidatesSecureCertificate:NO];.

如果幸运的话,您也会遇到同样的问题. :)

If you are lucky you have the same problem. :)

这篇关于iPhone 3G的ASIHTTPRequest的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆