http://qs321.pair.com?node_id=951204

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 (Pilgrim) 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.