package Net::Azure::CognitiveServices::Face::Base;
use strict;
use warnings;
use HTTP::Tiny;
use JSON;
use Carp;
use URI;
sub new {
my ($class, %opts) = @_;
return bless {%opts}, $class;
}
s
$uri->query_form(%query);
}
$uri;
}
sub json {
my $self = shift;
$self->{json} ||= JSON->new->utf8(1);
$self->{json};
}
sub agent {
my $self = shift;
$self->{agen
content-type'};
if ($content_type !~ /application\/json/) {
croak($res->{content});
}
$body = $self->json->decode($res->{content});
}
if (!$res->{success})