se mro;
use Syntax::Keyword::Try;
use Future;
use Net::Async::HTTP;
use Carp qw();
use JSON::MaybeUTF8 qw(:v1);
use URI::Escape;
use WebService::Async::CustomerIO::Customer;
use WebService
$self, $method, $uri, $data, $headers) = @_;
my $body =
$data ? encode_json_utf8($data)
: $method eq 'POST' ? q{}
: undef;
return $s
body ? ()
: (
content => $body,
content_type => 'application/json',
),
headers => $headers // {},
)->catch(
sub {
my ($cod