1WWW::Mechanize::GZip(3)User Contributed Perl DocumentatioWnWW::Mechanize::GZip(3)
2
3
4

NAME

6       WWW::Mechanize::GZip - tries to fetch webpages with gzip-compression
7

VERSION

9       Version 0.14
10

SYNOPSIS

12           use WWW::Mechanize::GZip;
13
14           my $mech = WWW::Mechanize::GZip->new();
15           my $response = $mech->get( $url );
16
17           print "x-content-length (before unzip) = ", $response->header('x-content-length');
18           print "content-length (after unzip) = ", $response->header('content-length');
19

DESCRIPTION

21       The WWW::Mechanize::GZip module tries to fetch a URL by requesting
22       gzip-compression from the webserver.
23
24       If the response contains a header with 'Content-Encoding: gzip', it
25       decompresses the response in order to get the original (uncompressed)
26       content.
27
28       This module will help to reduce bandwidth fetching webpages, if
29       supported by the webeserver. If the webserver does not support gzip-
30       compression, no decompression will be made.
31
32       This modules is a direct subclass of WWW::Mechanize and will therefore
33       support any methods provided by WWW::Mechanize.
34
35       The decompression is handled by Compress::Zlib::memGunzip.
36
37   METHODS
38       prepare_request
39         Adds 'Accept-Encoding' => 'gzip' to outgoing HTTP-headers before
40         sending.
41
42       send_request
43         Unzips response-body if 'content-encoding' is 'gzip' and corrects
44         'content-length' to unzipped content-length.
45

SEE ALSO

47       WWW::Mechanize
48
49       Compress::Zlib
50

AUTHOR

52       Peter Giessner "cardb@planet-elektronik.de"
53
55       Copyright (c) 2007, Peter Giessner "cardb@planet-elektronik.de".  All
56       rights reserved.
57
58       This module is free software; you can redistribute it and/or modify it
59       under the same terms as Perl itself.
60
61
62
63perl v5.34.0                      2021-07-27           WWW::Mechanize::GZip(3)
Impressum