Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I would like to be able to have the option to retry when I am running the code below. Is there an option in HTTP::Request::Common to do that? Also, is there a way to adjust the response time of the module so that it will wait for example, 5 seconds, before giving up?
#!/usr/bin/perl use warnings; use strict; use HTTP::Request::Common; use LWP::UserAgent; my $ua = LWP::UserAgent->new( cookie_jar => '' ); my $request = HTTP::Request->new( 'GET', 'http://www.google.com' ); my $result = $ua->request( $request ); print $result->status_line;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: HTTP::Request::Common Retry Option
by Your Mother (Archbishop) on Sep 17, 2010 at 23:16 UTC | |
Re: HTTP::Request::Common Retry Option
by Khen1950fx (Canon) on Sep 18, 2010 at 00:42 UTC | |
by bichonfrise74 (Vicar) on Sep 20, 2010 at 23:54 UTC |
Back to
Seekers of Perl Wisdom