App-ElasticSearch-Utilities

 view release on metacpan or  search on metacpan

lib/App/ElasticSearch/Utilities/HTTPRequest.pm  view on Meta::CPAN


our $VERSION = '8.8'; # VERSION

use JSON::MaybeXS;
use Ref::Util qw(is_ref is_arrayref is_hashref);

use parent 'HTTP::Request';

sub new {
    my $class = shift;
    my $self = $class->SUPER::new(@_);
    $self->header('Accept' => 'application/json');

    return $self;
}

sub content {
    my ($self,$body) = @_;

    if( is_arrayref($body) ) {
        # Bulk does this



( run in 1.224 second using v1.01-cache-2.11-cpan-49f99fa48dc )