NAME
Pithub::Request - Github v3 request object
VERSION
version 0.01001
ATTRIBUTES
data
The request data. It will be JSON encoded later and set in the HTTP::Request body.
http_request
The HTTP::Request object.
method
The HTTP method (GET, POST, PUT, DELETE, ...).
token
OAuth access token. If this is set, the authentication header is added to the "http_request" object.
ua
The LWP user agent. This is set from Pithub or any other module you are using. So you can exchange it by another module which implements the LWP::UserAgent interface.
$p = Pithub->new( ua => WWW::Mechanize->new );
$u = Pithub::Users->new( ua => WWW::Mechanize->new );
Of course you can set various options on the user agent object before you hand it over to the constructor, e.g. proxy settings.
uri
An URI object containing everything necessary to make that particular API call, besides the body (see "data for that").
METHODS
send
Send the HTTP request. It's just a oneliner actually:
$self->ua->request( $self->http_request );
AUTHOR
Johannes Plunien <plu@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Johannes Plunien.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.