NAME

App::MatrixTool::HTTPClient - HTTP client helper for App::MatrixTool

DESCRIPTION

Provides helper methods to perform HTTP client operations that may be required by commands of App::MatrixTool.

METHODS

resolve_matrix

@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.

resolve_addr

@addrs = $client->resolve_addr( $hostname )->get

Returns a list of human-readable string representations of the IP addresses resolved by the given hostname.

request

$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.

request_json

( $body, $response ) = $client->request_json( ... )

A small wrapper around request that decodes the returned body as JSON.

AUTHOR

Paul Evans <leonerd@leonerd.org.uk>