我正在尝试使用ASIHTTPrequest。但是当我运行我的代码时,我收到以下错误消息。
我的代码中有任何错误请帮助我,谢谢
Domain = ASIHTTPRequestErrorDomain Code = 6“无法获取信息 在请求“UserInfo = 0x6043490”所需的代理服务器上 {NSLocalizedDescription =无法获取有关代理服务器的信息 请求所需}
以下是我的源代码
- (void)viewDidLoad {
NSURL *url = [NSURL URLWithString:@"http://allseeing-i.com"];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request setDelegate:self];
[request startSynchronous];
[super viewDidLoad];
}
- (void)requestFailed:(ASIHTTPRequest *)request
{
NSLog(@"Error %@", [request error]);
if ([request error])
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:@"Fail."
delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
return;
}
}
答案 0 :(得分:0)
Google搜索错误消息会在ASIHTTPRequest邮件列表中显示多个结果:
http://groups.google.com/group/asihttprequest/browse_thread/thread/924540472d721696/0dd6d853005631b0
http://groups.google.com/group/asihttprequest/browse_thread/thread/c15bcb756773685a
简而言之,似乎错误很可能与获取代理自动配置文件的问题有关。
所以: