Search notes:

Perl module HTTP::Response

A HTTP::Response object is for example returned by LWP::UserAgent's get method.
The headers method returns a HTTP::Headers object.
#!/usr/bin/perl
use warnings;
use strict;
use feature 'say';

use LWP::UserAgent;

my $user_agent = LWP::UserAgent->new;

# LWP::UserAgent's get function returns a HTTP::Response object:
my $http_response = $user_agent->get('https://raw.githubusercontent.com/ReneNyffenegger/PerlModules/master/HTTP/Response/script.pl');
say ref $http_response;
#
# HTTP::Response


printf "code, message: %d %s\n", $http_response->code, $http_response->message;
printf "status line:   %s\n"   , $http_response->status_line; # same as above
printf "filename:      %s\n"   , $http_response->filename;
printf "base:          %s\n"   , $http_response->base;
Github repository PerlModules, path: /HTTP/Response/script.pl

See also

HTTP::Request
Perl modules

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1741107092, '18.216.181.229', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Perl/modules/HTTP/Response/index(66): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78