LWP::UserAgent qw//;
use JSON qw//;
use HTTP::Request qw//;
use Stance::GitHub::Organization;
sub from_json {
JSON->new->utf8->decode(@_);
}
sub to_json {
JSON->new->utf8->encode(@_);
$url))
or die "unable to create GET $url request: $!\n";
$req->header('Accept' => 'application/json');
$req->header('Authorization', 'token [REDACTED]')
if $self->{_token};
if ($self->{_debug})
-----------------\n";
print STDERR $res->as_string;
print STDERR "\n\n";
}
my $body = from_json($res->decoded_content);
if (!$res->is_success) {
$self->{_error} = $body;
return undef;
}