App::MatrixTool::HTTPClient - HTTP client helper for App::MatrixTool
App::MatrixTool::HTTPClient
Provides helper methods to perform HTTP client operations that may be required by commands of App::MatrixTool.
@res = $client->resolve_matrix( $server_name )->get
Returns a list of HASH references. Each has at least the keys target and port. These should be tried in order until one succeeds.
HASH
target
port
@addrs = $client->resolve_addr( $hostname )->get
Returns a list of human-readable string representations of the IP addresses resolved by the given hostname.
$response = $client->request( server => $name, method => $method, path => $path, ... )->get
Performs an HTTPS request to the given server, by resolving the server name using the resolve_matrix method first, thus obeying its published SRV records.
resolve_matrix
SRV
( $body, $response ) = $client->request_json( ... )
A small wrapper around request that decodes the returned body as JSON.
request
Paul Evans <leonerd@leonerd.org.uk>
To install App::MatrixTool, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::MatrixTool
CPAN shell
perl -MCPAN -e shell install App::MatrixTool
For more information on module installation, please visit the detailed CPAN module installation guide.