Re: How to deflate a ':content_file' response saved to a file

Bill Moseley <[email protected]> Mon, 16 Apr 2012 06:59:35 +0800
Newsgroups gmane.comp.lang.perl.modules.lwp
Message-ID <CAKhN_m4-3zAY7Y8DA6BpjvU8ZMKmqSP9+AmF_jRbyQxEAr8Jaw@mail.gmail.com>
On Sun, Apr 15, 2012 at 4:25 AM, Meir Guttman <[email protected]> wrote:

>        print $response->decoded_content, "\n";
>
> On the other hand, another variation of the 'get' method can save a
> response to a file, as in:
>
>        $ua->get($url, ':content_file' => $filename);
>
> But I couldn't find a way to first deflate the contents that is
> saved to file.
>
> Can someone point me to the right part of the LWP package?
>


Is there a reason you can't print the decoded content?

print $fh $res->decoded_content;


-- 
Bill Moseley
[email protected]