Group
Extension

Matches 2

WebService-DataDog ( J/JP/JPINKHAM/WebService-DataDog-1.0.3.tar.gz, JPINKHAM, 2015; MetaCPAN )
WebService-DataDog/lib/WebService/DataDog.pm ( view source; MetaCPAN )
use strict;
use warnings;

use Data::Dumper;
use LWP::UserAgent qw();
use HTTP::Request qw();
use JSON qw();
use Class::Load qw();
use Carp qw( carp croak );
use Data::Validate::Type qw();


our $API_
;


	my $json_in = JSON::encode_json( $args{'data'} );
	carp "Sending JSON request >" . ( defined( $json_in ) ? $json_in : '' ) . "<"
		if $verbose;

	$request->content_type('application/json');
	$req
uest->content( $json_in );

	carp "Request object: ", Dumper( $request )
		if $verbose;

	my $user_agent = LWP::UserAgent->new();
	my $response = $user_agent->request($request);

	if (! $response->is_
WebService-DataDog ( J/JP/JPINKHAM/WebService-DataDog-1.0.3.tar.gz, JPINKHAM, 2015; MetaCPAN )
WebService-DataDog/lib/WebService/DataDog/Alert.pm ( view source; MetaCPAN )
)
	{
		# You must use references to integers in order to have JSON.pm properly
		# encode these as JSON boolean values. Without this, JSON will encode integer
		# value as string...which is how I foun
tp://stackoverflow.com/questions/1087308/why-cant-i-properly-encode-a-boolean-from-postgresql-via-jsonxs-via-perl
		$data->{'silenced'} = ( $args{'silenced'} == 0 ? \0: \1 );
	}
	
	my $response = $sel
)
	{
		# You must use references to integers in order to have JSON.pm properly
		# encode these as JSON boolean values. Without this, JSON will encode integer
		# value as string...which is how I foun

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