perlquestion
Anonymous Monk
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?
<code>
#!/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;
</code>
6