8_001;
use Carp qw(croak);
use LWP::UserAgent;
use LWP::ConnCache;
use HTTP::Request;
use JSON qw(encode_json);
use Class::Accessor::Lite (
new => 0,
rw => [qw/ua api_url api_key/],
);
use
{delay_while_idle}) {
$payload->{delay_while_idle} = $payload->{delay_while_idle} ? JSON::true : JSON::false;
}
my $req = HTTP::Request->new(POST => $self->api_url);
$req->header(
;
$req->header('Content-Type' => 'application/json; charset=UTF-8');
$req->content(encode_json $payload);
return $req;
}
1;
__END__
=encoding utf-8
=for stopwords
=head1 NAME
WWW::Goo