Restish-Client

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN


SYNOPSIS
    my $client = Restish::Client->new(
        uri_host            => 'https://vault.example.com/',
        head_params_default => { X-Vault-Token => a_token },
        agent_options       => { timeout => 5 },
        require_https       => 1,
        ssl_opts => {
            -=> 1,
            SSL_cert_file   => "/etc/ssl/certs/cert.pem",
            SSL_key_file    => "/etc/ssl/private_keys/key.pem",
        },
        cooke_jar           => 1,
    );

    $client->head_params_default({ 'X-Vault-Token' => $auth_token });
    $client->ssl_opts({ SSL_use_cert => 1 });

    $client->cookie_jar(1); # OR
    $client->cookie_jar(/path/to/cookiejar);

lib/Restish/Client.pm  view on Meta::CPAN

=item C<new>

    my $client = Restish::Client->new(
        uri_host            => 'https://vault.example.com/',
        head_params_default => { 'X-Vault-Token' => $a_token },
        agent_options       => { timeout => 5 },
        require_https       => 1,
        ssl_opts => {
            SSL_use_cert    => 1,
            SSL_cert_file   => "/etc/ssl/certs/cert.pem",
            SSL_key_file    => "/etc/ssl/private_keys/key.pem",
        },
        cookie_jar          => 1,
    );

Construct a new Restish::Client object. The uri_host is used as the base
uri for each API call, and serves as a template if string interpolation is used
(see below). 

Optionally provide any data that can be set via a mutator, such as
head_params_default or the ssl_opts.



( run in 1.857 second using v1.01-cache-2.11-cpan-39bf76dae61 )