DNS-NIOS
view release on metacpan or search on metacpan
lib/DNS/NIOS/Response.pm view on Meta::CPAN
}
sub is_success {
return shift->_http_response->is_success;
}
sub content {
my $self = shift;
my $h;
try {
$h = from_json( $self->_http_response->decoded_content );
}
catch {
$h = $self->_http_response->decoded_content;
# For some reason <5.28 returns a quoted string during test
$h =~ s/^"|"$//g;
};
return $h;
}
sub json {
my $self = shift;
try {
lib/DNS/NIOS/Response.pm view on Meta::CPAN
Response code
=head2 is_success
Wether the request was successful
=head2 content
Response content as hashref. If the content for some reason cannot be converted,
it will return the decoded_content as is.
=head2 json
Return a json string.
=head2 pretty
Return a prettified json string.
=for Pod::Coverage BUILD
( run in 0.262 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )