erAgent;
use Data::Dumper;
use HTTP::Cookies;
use REST::Client;
use Scalar::Util qw(reftype);
use JSON;
use Storable qw(dclone);
use Exporter qw(import);
our @EXPORT_OK = qw(get post put delete postD
"Content-Type", 'application/x-www-form-urlencoded');
$client->addHeader ("Accept", "application/json");
$self->{'client'} = $client;
# if we have a token, use it
if (defined $self->{'token'}) {
a POST request
#
# @param endpoint, the JSON to POST
# @retval the response
#*
sub post(){ # endpoint, json
my $self = shift;
my $endpt = shift;
my $json = shift;
my $endpoint = "";
if ($end