package MojoX::JSONRPC2::HTTP;
use Mojo::Base -base;
use Carp;
our $VERSION = 'v2.0.3';
use Mojo::UserAgent;
use JSON::RPC2::Client;
use JSON::XS;
use Scalar::Util qw(weaken);
use constant REQUEST
lication/json';
has headers => sub { {} };
has ua => sub {
Mojo::UserAgent->new
->inactivity_timeout(0)
->request_timeout(REQUEST_TIMEOUT)
};
has _client => sub { JSON::RPC2::
($json_request, $call) = $self->_client->$func($method, @params);
my $tx; # will be set when in blocking mode
weaken(my $this = $self);
if ('GET' eq uc $self->method) {
my $json =