strict;
use warnings;
package Apache::Tika;
use Encode qw/decode_utf8/;
use LWP::UserAgent;
use JSON::MaybeXS();
our $VERSION = '0.07';
sub new {
my ($this, %pars) = @_;
my $self = bless {}, $t
ua} // LWP::UserAgent->new();
$self->{url} = $pars{url} // 'http://localhost:9998';
$self->{json} = JSON::MaybeXS->new();
return $self;
}
sub _request {
my ($self, $method, $path, $headers, $bod
'put',
'meta',
{
'Accept' => 'application/json',
$contentType? ('Content-type' => $contentType) : ()
},
$bytes
);
return $self->{json}->decode($meta);
}
sub rmeta {
my ($self, $byt