Archive::Har::Entry::Cookie - Represents a single http cookie object for a request or response inside the HTTP Archive
Version '0.11'
use Archive::Har(); my $http_archive_string = '"log": { "version": "1.1", .... '; my $har = Archive::Har->new(); $har->string($http_archive_string); foreach my $entry ($har->entries()) { my $request = $entry->request(); foreach my $cookie ($request->cookies()) { print "Name: " . $header->name() . "\n"; print "Value: " . $header->value() . "\n"; print "Path: " . $header->path() . "\n"; print "Domain: " . $header->domain() . "\n"; print "Expires: " . $header->expires() . "\n"; print "httpOnly: " . $header->http_only() . "\n"; print "secure: " . $header->secure() . "\n"; print "Comment: " . $header->comment() . "\n"; } }
returns the name of the cookie
returns the value of the cookie
returns the path of the cookie
returns the domain of the cookie
returns the expiry date (if any) of the cookie
returns a true/false value if the cookie is marked as httpOnly
returns a true/false value if the cookie is marked as secure, to only be transmitted over https
returns the comment about the header
To install Archive::Har, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Archive::Har
CPAN shell
perl -MCPAN -e shell install Archive::Har
For more information on module installation, please visit the detailed CPAN module installation guide.