NAME
Pithub::Request
VERSION
version 0.01000
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 );