Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Where is LWP::Simple::get error information stored?

by Anonymous Monk
on Sep 28, 2012 at 13:36 UTC ( #996220=note: print w/ replies, xml ) Need Help??


in reply to Re: Where is LWP::Simple::get error information stored?
in thread Where is LWP::Simple::get error information stored?

LWP::UserAgent doesn't?

use LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->env_proxy; my $response = $ua->get('http://example.org/'); print "HTTP response code was: ", $response->status_line, "\n"; #print "Content was:\n", $response->content, "\n";
HTTP response code was: 200 OK HTTP response code was: 404 Not Found HTTP response code was: 500 Can't connect to 127.0.0.1:80 (Invalid arg +ument)


Comment on Re^2: Where is LWP::Simple::get error information stored?
Select or Download Code
Re^3: Where is LWP::Simple::get error information stored?
by Anonymous Monk on Sep 28, 2012 at 13:54 UTC

    Of course it doesn't, it forces you to store it

    my $response = $ua->get('http://example.org/');

      Oh, and it forces you to store the content, too? How inconvenient!

        Oh, and it forces you to store the content, too? How inconvenient!

        WWW::Mechanize is more convenient!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://996220]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (17)
As of 2014-09-30 17:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (379 votes), past polls