rce::API::Client;
use strict;
use warnings;
use Encode qw( decode_utf8 );
use JSON::Parse qw( json_to_perl );
use JSON::XS;
use MIME::Base64;
use REST::Client;
use Try::Tiny;
use URI::Escape qw( uri
f, %opts) = @_;
if ($opts{method} =~ /^(POST|PUT)$/) {
$opts{data} = encode_json($opts{data}) if $self->{sendJSON};
} else {
$opts{data} = '';
}
return %opts;
}
sub _parse_headers {
id};
}
if ($opts{method} =~ /^(POST|PUT)$/) {
if ($self->{sendJSON}) {
$headers->{'Content-type'} = 'application/json;charset=UTF-8';
} else {
$headers->{'Content-type'} = 'app