Group
Extension

Matches 1

WWW-Foreman-API ( S/SK/SKYSYMBOL/WWW-Foreman-API-0.001.tar.gz, SKYSYMBOL, 2017; MetaCPAN )
WWW-Foreman-API/lib/WWW/Foreman/API.pm ( view source; MetaCPAN )

use Encode;
use Exporter 'import';
my @EXPORT = ();
my @EXPORT_OK = qw(get post put delete);
use JSON;
use MIME::Base64;
use REST::Client;

# ABSTRACT: Perl client to the Foreman API

sub new {
    m
 my $headers = $self->set_headers();
    $client->GET($path, $headers);
    my $response = decode_json(decode_utf8($client->responseContent()));

    return $response;
}

sub post {
    my ($self, $pa
    croak 'The #2 argument to post() must be a hash' if ref($_[2]) ne 'HASH';
    $params = JSON::encode_json($params);
    my $client = $self->create_client();
    my $headers = $self->set_headers();

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.