IO::Lambda::HTTP::UserAgent(3p)

NAME
IO::Lambda::HTTP::UserAgent - common properties for http requests

DESCRIPTION
The module is a simple convenience wrapper for "IO::Lambda::HTTP::Client" for shared properties such as cookies, connection cache, etc.

SYNOPSIS
   use IO::Lambda::HTTP::UserAgent;
   use HTTP::Request;
   my $ua = IO::Lambda::HTTP::UserAgent->new;
   $ua->request( HTTP::Request->new( .. ) )->wait;

API

new %OPTIONS
    Creates a user agent instance

conn_cache $CACHE
    Shared instance of a "LWP::ConnCache" object

cookie_jar $JAR
    Shared instance of a "HTTP::Cookies" object

protocol $HTTP
    Default is "HTTP/1.1"

request HTTP::Request, %OPTIONS
    Creates a lambda that would end when the request is finished. The lambda returns either a "HTTP::Response" object or an error string

    Options:

    class $STRING = IO::Lambda::HTTP::Client
        Sets class of a HTTP client.

signature $STRING
    The default "User-Agent" header

timeout $INTEGER
    Timeout for requests, default 60 seconds.