
FishMonger
Veteran
/ Moderator
Dec 17, 2015, 5:18 PM
Post #4 of 5
(2837 views)
|
Re: [zatlas1] wait time for LWP request
[In reply to]
|
Can't Post
|
|
I looked for such an attribute (timeout) for LWP::UserAgent before I'd posted the question,and could not find it. I looked again and could not find it again. What is the exact name of the attribute? Thank you ZA That's odd since it's shown in the synopsis.
SYNOPSIS ^ require LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; my $response = $ua->get('http://search.cpan.org/'); if ($response->is_success) { print $response->decoded_content; # or whatever } else { die $response->status_line; } Did you read the synopsis? It's also in the Constructor Methods. Did you read that?
(This post was edited by FishMonger on Dec 17, 2015, 5:23 PM)
|