rnings;
# Module for interacting with the REST service
use HTTP::Tiny;
# JSON decode
use JSON::PP qw(encode_json decode_json);
# Base64 encode for avatar images
use MIME::Base64 qw(encode_base64);
res after a webhook request
sub _parse_response {
my $self = shift;
my $json = shift;
my $response = decode_json($json);
# sanity
if ( $self->{id} ne $response->{id} ) {
croak "SERVICE
quest(
'PATCH', $url,
{
headers => { 'Content-Type' => 'application/json' },
content => encode_json( \%request )
}
);
if ( !$response->{success} ) {
# non-200 code ret