ingydotnet / io-all-pm

All in One Perl IO
http://search.cpan.org/dist/IO-All/
38 stars 20 forks source link

IO::LWP documentation #114

Open saturdaywalkers opened 4 years ago

saturdaywalkers commented 4 years ago

Please add another example to the doco that shows how to check the HTTP status, e.g.

my $response = io( "https://www.google.com" )->get() ; # =, NOT < or >
print $response->is_success() . "\n"; # from HTTP::Request
print $response->headers_as_string() . "\n"; # from HTTP::Message
print $response->header('Content-Length') . "\n";
print $response->code() . "\n";
print $response->content() . "\n";