3004';
use Carp;
use LWP::UserAgent;
use LWP::MediaTypes;
use HTTP::Request;
use URI::Query;
use JSON;
use Search::Tools;
use Dezi::Response;
=head1 NAME
Dezi::Client - interact with a Dezi server
( !$resp->is_success ) {
croak $resp->status_line;
}
my $paths = from_json( $resp->decoded_content );
if ( !$resp->is_success
or !$paths
o
->{search_uri};
my $query = URI::Query->new(%args);
$query->replace( t => 'JSON' ); # force json response
$query->strip('format'); # old-style name
if ( $self->{serve
;
use Moo;
use Types::Standard qw( Str Num Int ArrayRef HashRef InstanceOf Maybe );
use Carp;
use JSON;
use Dezi::Doc;
use namespace::autoclean;
our $VERSION = '0.003004';
has 'http_response' => ( i
sponse> )
Returns a new response. I<http_response> should be a HTTP::Response
object from a Dezi JSON response.
=head2 BUILDARGS
Allows for single argument I<http_response> instead of named pair.
{
my $self = shift;
my $json = from_json( $self->http_response->decoded_content );
# inflate json into self, except results
for my $attr ( keys %$json ) {
next if $attr eq 'r