The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::Chart::UserAgent -- LWP useragent subclass

SYNOPSIS

 use App::Chart::UserAgent;
 my $ua = App::Chart::UserAgent->instance;

CLASS HIERARCHY

    LWP::UserAgent
      App::Chart::UserAgent

DESCRIPTIONS

This is a small subclass of LWP::UserAgent which sets up, by default,

  • Connection caching, currently just 1 kept open at any time.

  • User-Agent identification header.

  • Accept-Encoding header with HTTP::Message::decodable() to let the server send gzip etc. This means all responses should be accessed with $resp->decoded_content(), not raw content().

  • Progress and redirection messages (back through App::Chart::Download).

FUNCTIONS

App::Chart::UserAgent->instance

Return a shared App::Chart::UserAgent object. This shared instance is meant for all normal use.

App::Chart::UserAgent->new (key => value, ...)

Create and return a new App::Chart::UserAgent object.

App::Chart::UserAgent->_agent
$ua->_agent

Return the default User-Agent header string. This is Chart plus the LWP default, eg.

    Chart/100 libwww-perl/5.814

SEE ALSO

LWP::UserAgent