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();