ters' => [ qw(baseurl headers limit mode sslcheck timeout token ua) ],
};
use Data::Dumper;
use JSON;
use Encode;
use HTTP::Request;
use LWP::UserAgent;
use URI::Escape;
use constant {
#{{{
{
'Accept' => 'application/json',
'Authorization' => sprintf('Token %s', $self->{'token'}),
'Content-Type' => 'application/json',
};
$self->{'ua'} = LWP::UserAg
4, 'operation timed out' ],
E_DECFAIL => [ 5, 'failed to decode data from response JSON' ],
E_BADQUERY => [ 6, 'invalid GraphQL query at line %s, column %s: %s' ],
E_NOT
e boolean qw(:all);
use parent qw(NetBox::API::Common);
use Data::Dumper;
use HTTP::Request;
use JSON;
use URI::Escape;
BEGIN {
#{{{
require Exporter;
our @ISA = qw(Exporter);
our @E
t = HTTP::Request->new($method, sprintf('%s/%s/', $self->baseurl, $query));
$request->content(JSON->new->pretty(0)->encode($vars));
eval {
local $SIG{'ALRM'} = sub { die "operation tim
{
my $content = $response->decoded_content;
my $payload = decode_json $content;
unless (defined $payload) {
$self->__seterror(NetBo