Agent;
use HTTP::CookieJar::LWP;
use Cpanel::JSON::XS;
use File::Basename;
use IO::File;
has json => (
is => 'ro',
default => sub {
return Cpanel::JSON::XS->new->utf8->pretty(1)->allow_nonref;
}
_parse_response {
my ($self, $response) = @_;
if ($response->is_success) {
return $self->json->decode($response->decoded_content);
} else {
return { ok => 0, error => $response->status_l