NAME
HTTP::API::Client - API Client
USAGE
use HTTP::API::Client;
my $ua1 = HTTP::API::Client->new;
my $ua2 = HTTP::API::Client->new(base_url => URI->new( $url ) );
my $ua3 = HTTP::API::Client->new(base_url => URI->new( $url ) );
$ua->send( $method, $url, \%data, \%header );
Send short hand methods - get, post, head, put and delete
Example:
$ua->get( $url ) same as $ua->send( GET, $url );
$ua->post( $url, \%data, \%headers ) same as $ua->send( GET, $url, \%data, \%headers );
Get Json Data - grab the content body from the response and json decode
my $data = $ua->json_response;
At the moment, only support query string and json data in and out