=~ m!\Ahttps?:/(/?)!i) {
my $is_unix = !$1;
my $ht;
require JSON;
state $json = JSON->new->allow_nonref;
if ($is_unix) {
require HTTP::Tiny::UNIX;
n},
"x-riap-action" => $action,
"x-riap-fmt" => "json",
"content-type" => "application/json",
);
my $args = $extra->{args} // {};
for (keys
$ht->post(
$url, {
headers => \%headers,
content => $json->encode($args),
});
return [500, "Network error: $htres->{status} - $htres->{