Group
Extension

Matches 3

API-Handle ( A/AM/AMIRITE/API-Handle-0.02.tar.gz, AMIRITE, 2013; MetaCPAN )
API-Handle/lib/API/Handle.pm ( view source; MetaCPAN )
$self->util->methods... or not

has _json => (
	is => 'rw'
	, isa => 'JSON::XS'
	, lazy => 1
	, required => 1
	, default => sub {
		require JSON::XS;
		 return JSON::XS->new->utf8->ascii->relaxed;
	}
ent', tied => 1 );
	}

	# Leave it up to the API implementation to encode the hash/array ref into JSON / Form data / XML / etc.
	$req->content( $args{content} ) if defined $args{content};
	$req->metho
ncode {
	my ( $self, %args ) = @_;
	my ( $data );

	for ( $args{type} ) {
		when ( 'json' ) {
			$data = $self->_json->encode( $args{data} );
		}
		when ( 'xml' ) {
			$data = $self->_xml->write( $arg
API-Handle ( A/AM/AMIRITE/API-Handle-0.02.tar.gz, AMIRITE, 2013; MetaCPAN )
API-Handle/lib/API/Handle/Google/DFP.pm ( view source; MetaCPAN )
 $self->ua->request( $req );

		if ( $res->code == 200 ) {
			my $data = $self->_decode( type => 'json', data => $res->content );
			$data->{expires_at} = time + $data->{expires_in};
			$self->merge_c
API-Handle ( A/AM/AMIRITE/API-Handle-0.02.tar.gz, AMIRITE, 2013; MetaCPAN )
API-Handle/lib/API/Handle/OpenX.pm ( view source; MetaCPAN )
 $req->content ) {
				my $json = $self->_encode( type => 'json', data => $data );
				$req->content( $json );
				$req->headers->header( 'Content-Type' => 'application/json; charset=utf-8' );

				# 
Uncomment this to view generated JSON content.
				# $self->debug( $json );
			}
		}
		, m_scheme => $scheme
		, m_host => $host
		, m_path_match => qr/^\Q$path\E/
	);

	# Add response wrapper.
	$self
( $res, $ua, $h ) = @_;
			if ( my $data = $res->content ) {
				$data = $self->_decode( type => 'json', data => $data );
				$res->content( $data );
			}
		}
		, m_scheme => $scheme
		, m_host => $ho

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