Elastijk;
use strict;
use warnings;
our $VERSION = "0.13";
use JSON ();
use URI::Escape qw(uri_escape_utf8);
use Hijk;
our $JSON = JSON->new->utf8;
sub _build_hijk_request_args {
my $args = $_[
| '9200',
path => $path,
head => [
'Content-Type' => 'application/json',
( (exists $args->{head}) ? (@{$args->{head}}) : ()),
],
$qs?( query
= {%{$_[0]}};
$arg->{body} = $JSON->encode( $arg->{body} );
}
my ($status, $res_body) = request_raw($arg);
$res_body = $res_body ? eval { $JSON->decode($res_body) } : undef;
re