Megaport::Client
This class provides a simple mechanism for making API calls and performing error handling and returning data in a well-known format intended for use in the rest of the Megaport package.
Performs the appropriate login action based on the credentials provided (username/password or token).
username/password
token
If no_verify is not set, this is called by login to validate the token.
no_verify
login
# Simple GET my $data = $client->request(GEt => '/locations'); # POST my $data = $client->request(POST => '/profile', content => encode_json($user));
Performs a HTTP request, arguments are similar to HTTP::Request but trimmed. Creates a HTTP::Request object with the right base URI and auth headers.
If debug is set, this will also dump the response body to STDERR.
debug
Cameron Daniel <cdaniel@cpan.org>
To install Megaport, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Megaport
CPAN shell
perl -MCPAN -e shell install Megaport
For more information on module installation, please visit the detailed CPAN module installation guide.