Group
Extension

Matches 2

DNS-NIOS ( S/SS/SSMN/DNS-NIOS-0.005.tar.gz, SSMN, 2021; MetaCPAN )
DNS-NIOS/lib/DNS/NIOS.pm ( view source; MetaCPAN )
ing for NIOS
# VERSION
# AUTHORITY

## use critic
use strictures 2;

use Carp qw(croak);
use JSON qw(to_json);
use LWP::UserAgent;
use MIME::Base64 qw(encode_base64);
use URI;
use URI::QueryParam;
use

  $self->{ua}->default_header( 'Accept'       => 'application/json' );
  $self->{ua}->default_header( 'Content-Type' => 'application/json' );
  $self->{ua}->default_header( 'Authorization' => 'Basic 
l} . $path . $query_params );

  if ( $op eq 'PUT' or $op eq 'POST' ) {
    $request->content( to_json($payload) );
  }

  return DNS::NIOS::Response->new(
    _http_response => $self->{ua}->request($
DNS-NIOS ( S/SS/SSMN/DNS-NIOS-0.005.tar.gz, SSMN, 2021; MetaCPAN )
DNS-NIOS/lib/DNS/NIOS/Response.pm ( view source; MetaCPAN )
e object
# VERSION
# AUTHORITY

## use critic
use strictures 2;
use Carp qw(croak);
use JSON qw(from_json to_json);
use Try::Tiny;
use namespace::clean;
use Class::Tiny qw( _http_response );

sub BUIL
->_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


sub json {
  my $self = shift;
  try {
    my $h = to_json( $self->content, @_ );
    return $h;
  };
  return to_json( { content => $self->content }, @_ );
}

sub pretty {
  return shift->json( { u

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.