e';
use JSON;
use Carp;
sub as_hashref {
my $self = shift;
return if !$self->is_success;
my $type = $self->header('Content-Type');
if ($type && $type =~ /\Aapplication\/json/) {
return JSON->new->utf8(1)->decode($self->content);
}
return;
}
1;
=encoding utf-8
=head1 NAME
Net::Azure::EventHubs::Response - A Response Class for Net::Azure::EventHubs
=head1 SYN
->new(GET => 'http://...');
$req->agent(LWP::UserAgent->new);
my $res = $req->do;
my $json_data = $res->as_hashref;
=head1 DESCRIPTION
Net::Azure::EventHubs::Response is a response class