2
我使用Perl模块AnyEvent :: HTTP按照这个帖子进行异步HTTP请求的尝试:http://www.windley.com/archives/2012/03/asynchronous_http_requests_in_perl_using_anyevent.shtmlPerl的AnyEvent :: HTTP请求失败
不过,我没有能够得到它通过代理工作...
my $request;
my $host = '<userid>:<pswd>@<proxyip>';
my $port = '<proxyport>';
my $headers = { ...
'Accept-Language'=> 'en-us,en;q=0.5',
'Accept-Charset'=> 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'Keep-Alive' => 300,
};
$request = http_request(
GET => $url,
timeout => 120, # seconds
headers => $headers,
proxy => [$host, $port],
mymethod
);
$cv->end;
$cv->recv;
我得到了上面的代码下面的错误
{
'Reason' => 'No such device or address',
'URL' => 'www.google.com',
'Status' => 595
};
没有代理ARG(与代理认证细节代之后)它的请求,它的作品。从CPAN页http://metacpan.org/pod/AnyEvent::HTTP,
595 - 连接建立过程中出现错误,代理握手
请帮我找出这个代码的问题。谢谢!