$self->header->{Accept} =
"application/vnd.pagerduty+json;version=" . $self->api_version;
$self->content_type('application/json');
$self->base_url('https://api.pagerduty.com');
$se
1627';
}
## use critic
use strict;
use warnings;
use base qw/ WebService::PagerDuty::Base /;
use JSON;
use Error qw/ :try /;
my @all_options = qw/
code status message error
incident_key
total
essage();
$options->{errors} = undef;
try {
$options->{data} = from_json( $response->content() ) if $response->content();
}
otherwise {
my $er
that could happen and we care of - it's when $response->content can't
## be parsed as json (no difference why - because of bad request or something else)
$options->{data} = {
warnings;
use base qw/ WebService::PagerDuty::Base /;
use HTTP::Request;
use LWP::UserAgent;
use JSON;
use URI;
use URI::QueryParam;
use WebService::PagerDuty::Response;
__PACKAGE__->mk_ro_accessors
rams;
my $headers = HTTP::Headers->new;
$headers->header( 'Content-Type' => 'application/json' ) if %$body;
$headers->authorization_basic( $user, $password ) if $user && $password;
$h
'Authorization' => "Token token=$api_key" ) if $api_key;
my $content = '';
$content = to_json($body) if %$body;
my $request = HTTP::Request->new( $method, $url, $headers, $content );