0day has asked for the wisdom of the Perl Monks concerning the following question:
use AnyEvent::HTTP; http_request GET => "$url", headers => { 'Host' => $host, 'Connection' => 'keep-alive', 'User-Agent' => 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.8 (KH +TML, like Gecko) Chrome/20.0.1108.0 Safari/536.8', 'Content-Type' => 'application/x-www-form-urlencoded', 'Referer' => $host }, tcp_connect => sub { my ($host, $service, $connect_cb, $prepare_cb) = @_; tcp_connect $ip, $service, sub { $connect_cb->(@_); }, sub { $prepare_cb->(@_); }; }, sub { #my ($body, $hdr) = @_; callback ($_[0], $_[1], $ip, $host, undef, undef, undef, $error_co +unt, $redirect); $cv->end; };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Timeout for connect in Anyevent::HTTP. Help, please.
by Tanktalus (Canon) on Sep 19, 2012 at 17:48 UTC | |
by kashrman (Novice) on Oct 11, 2013 at 10:38 UTC | |
by Tanktalus (Canon) on Oct 11, 2013 at 15:26 UTC |