Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

send compressed content with LWP::UserAgent

by david2008 (Scribe)
on Feb 01, 2012 at 12:57 UTC ( #951204=perlquestion: print w/replies, xml ) Need Help??
david2008 has asked for the wisdom of the Perl Monks concerning the following question:

Is there a way to send compressed content through LWP::UserAgent?
Is there a way to say LWP::UserAgent that every post request will be sent compressed?
  • Comment on send compressed content with LWP::UserAgent

Replies are listed 'Best First'.
Re: send compressed content with LWP::UserAgent
by lune (Monk) on Feb 01, 2012 at 14:57 UTC
    You need to set the appropriate HTTP Headers, as mentioned here: Gzip (under "Other uses").
    For setting them use HTTP::Headers as described in LWP::UserAgent.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://951204]
Approved by Corion
Corion looks at TheDamians new modules. It seems he's written another Perl parser in a regexp and uses it for Keyword::Declare ...
[Discipulus]: from txt to array, from array to polemic, from polemic to flame?
[Corion]: Discipulus++ # profound insight
[Corion]: :-D

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2017-06-23 07:56 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (536 votes). Check out past polls.