Net::Async::Webservice::Common::SyncAgentWrapper - minimal wrapper to adapt a sync UA
version 1.0.2
This class wraps an instance of LWP::UserAgent (or something that looks like it) to allow it to be used as if it were a Net::Async::HTTP. It is very limited at the moment, please read all of this document and, if you need more power, submit a bug request.
An instance of this class will be automatically created if you pass a LWP::UserAgent (or something that looks like it) to the constructor for a class doing Net::Async::Webservice::Common::WithUserAgent.
ua
The actual user agent instance.
do_request
Delegates to $self->ua->request, and returns an immediate Future. It supports just a few of the options you can pass to the actual method in Net::Async::HTTP. These are supported:
$self->ua->request
request => HTTP::Request
request =>
host => string
host =>
port => int or string
port =>
uri => URI or string
uri =>
method => string
method =>
content => string or arrayref
content =>
content_type => string
content_type =>
user => string
user =>
pass => string
pass =>
fail_on_error => boolean
fail_on_error =>
In additon, options with keys of the form SSL_* will be set via the ssl_opts method, if the underlying user agent supports it.
SSL_*
ssl_opts
GET
$ua->GET( $uri, %args ) ==> $response
HEAD
$ua->HEAD( $uri, %args ) ==> $response
POST
$ua->POST( $uri, $content, %args ) ==> $response
Convenient wrappers for using the GET, HEAD or POST methods with a URI object and few if any other arguments, returning a Future.
URI
Future
Please check the documentation of "do_request" for the values you can usefully pass in %args.
%args
Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com>
This software is copyright (c) 2014 by Net-a-porter.com.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Net::Async::Webservice::Common, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Async::Webservice::Common
CPAN shell
perl -MCPAN -e shell install Net::Async::Webservice::Common
For more information on module installation, please visit the detailed CPAN module installation guide.