URI::Escape qw(uri_escape uri_escape_utf8);
use Carp 'croak';
use List::Util '1.29', 'pairs';
use JSON;
## NOTE: This is an inside-out object; remove members in
## NOTE: the DESTROY() sub if you add
cation/json';
}
my $content = '';
if( keys %args ) {
if ($content_type eq 'application/json' && ( $method eq 'POST' || $method eq 'PUT') ) {
$content = $self->_build_json_conte
od($val // '');
}
return join('&', @args) || '';
}
sub _build_json_content {
my $self = shift;
my $json = JSON->new->allow_nonref;
my $args = ();
for my $pair (pairs @_) {