繁体   English   中英

iPhone 3G 的 ASIHTTPRequest

[英]ASIHTTPRequest with iPhone 3G

我在我的项目中使用 ASIHTTPRequest,但 iPhone 3G 有问题。 我发送请求至:

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

在其他设备上,我收到以下回复:

- (void)requestFinished:(ASIHTTPRequest *)request

在 iPhone 3G 中,我得到了很多次:

- (void)requestFailed:(ASIHTTPRequest *)request

错误消息: The request timed out

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

知道为什么会这样吗?

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

您可以添加[request setValidatesSecureCertificate:NO]; 根据您的要求。

如果你幸运的话,你会遇到同样的问题。 :)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM