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

NAME

OAuth::Lite::Agent - default agent class

SYNOPSIS

    $agent = OAuth::Lite::Agent->new;
    my $res = $agent->request($req);

DESCRIPTION

Default user agent for OAuth::Lite::Consuemr.

METHODS

new

constructor.

    OAuth::Lite::Agent->new();

You can pass custom agent, that is required to implement 'request' and 'agent' methods corresponding to the same named methods of LWP::UserAgnet.

    my $custom_agent = LWP::UserAgent->new(timeout => 10);
    OAuth::Lite::Agent->new($custom_agent);

agent

agent setter

    $agent->agent("MyAgent/1.0.0");

request

As same as LWP::UserAgent, pass HTTP::Request object and returns HTTP::Response object.

    $res = $agent->request($req);

filter_request

filter the HTTP::Request object before request.

filter_response

filter the HTTP::Response object after request.

SEE ALSO

http://oauth.pbwiki.com/ProblemReporting

AUTHOR

Lyo Kato, lyo.kato _at_ gmail.com

COPYRIGHT AND LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.