Apache-Tika-Async
view release on metacpan or search on metacpan
lib/Apache/Tika/Connection.pm view on Meta::CPAN
sub decode_response {
my( $self, $body ) = @_;
return decode_json( $body );
}
sub process_response {
my ( $self, $params, $code, $msg, $body, $headers ) = @_;
my $mime_type = $headers->{"content-type"};
my $is_encoded = $mime_type && $mime_type !~ m!^text/plain\b!;
# Request is successful
if ( $code >= 200 and $code <= 209 ) {
if ( defined $body and length $body ) {
# Let's hope it's JSON
$body = $self->decode_response($body)
if $is_encoded;
( run in 3.298 seconds using v1.01-cache-2.11-cpan-524268b4103 )