Archive::Har - Provides an interface to HTTP Archive (HAR) files
Version '0.21'
use Archive::Har(); my $http_archive_string = '"log": { "version": "1.1", .... '; my $har = Archive::Har->new(); $har->string($http_archive_string); print $har->creator()->name() . ' version ' . $har->creator()->version(); $har->creator()->name("new name"); # update har print $har->browser()->name() . ' version ' . $har->browser()->version(); foreach my $page = $har->pages()) { $page->comment("Something interesting here"); print "Page Title: " . $page->title() . "\n"; } print $har; # print har in stringified pretty form ...
This Module is intended to provide an interface to create/read/update entire HTTP Archive (HAR) files.
Archive::Har->new() will return a new HAR object, ready to process HTTP archives
$har->string() accepts a stringified version of an HTTP archive and parses it. It returns the previous state of the archive in stringified form
$har->hashref() accepts a hashref of the HTTP archive and parses it. It returns a hashref of the previous state of the archive
$har->gzip() accepts a gzipped version of an HTTP archive and parses it. It returns a gzipped version of the previous state of the archive
$har->xml() accepts a stringified version of Internet Explorer's Network Inspector XML export and parses it. There is no return value
$har->version() will return the version of the HTTP Archive ('1.1' by default)
$har->creator() will return the creator object for the HTTP Archive
$har->browser() will return the browser object for the HTTP Archive
$har->pages() will return the list of page objects for the HTTP Archive
$har->entries() will return the list of entry objects for the HTTP Archive
$har->comment() will return the comment for the HTTP Archive
Failed to gzip HAR archive
An error occurred while gzipping.
Failed to gunzip HAR archive
An error occurred while gunzipping.
Archive::Har requires no configuration files or environment variables.
Archive::Har requires the following non-core Perl modules
JSON
IO::Compress::Gzip
IO::Uncompress::Gunzip
XML::LibXML
None reported
HTTP Archive 1.2 Specification
David Dick, <ddick at cpan.org>
<ddick at cpan.org>
Please report any bugs or feature requests to bug-archive-har at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Archive-Har. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-archive-har at rt.cpan.org
Copyright 2015 David Dick.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
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.