around Gerrit's REST API
use 5.010;
use utf8;
use strict;
use warnings;
use Carp;
use URI;
use JSON;
use Data::Util qw/:check/;
use REST::Client;
sub new {
my ($class, $URL, $username, $passwo
ication by default
$rest->setFollow(1);
# Request compact JSON by default
$rest->addHeader('Accept' => 'application/json');
# Configure UserAgent name and password authentication
Code Review', $username, $password);
}
return bless {
rest => $rest,
json => JSON->new->utf8->allow_nonref,
} => $class;
}
sub _error {
my ($self, $content, $type, $c