API-Client
view release on metacpan or search on metacpan
t/API_Client.t view on Meta::CPAN
my $req = $result->req;
is lc($req->method), 'delete';
my $res = $result->res;
is $res->code, 200;
my $json = $res->json;
is $json->{headers}{'Host'}, 'httpbin.org';
is $json->{headers}{'Content-Type'}, 'application/json';
is_deeply $json->{json}, undef;
is_deeply $json->{form}, {};
is $json->{data}, '';
$result
});
$subs->example(-1, 'dispatch', 'method', fun($tryable) {
ok my $result = $tryable->result;
my $req = $result->req;
t/API_Client.t view on Meta::CPAN
my $req = $result->req;
is lc($req->method), 'get';
my $res = $result->res;
is $res->code, 200;
my $json = $res->json;
is $json->{headers}{'Host'}, 'httpbin.org';
is $json->{headers}{'Content-Type'}, 'application/json';
is_deeply $json->{json}, undef;
is_deeply $json->{form}, undef;
is $json->{data}, undef;
$result
});
$subs->example(-1, 'patch', 'method', fun($tryable) {
ok my $result = $tryable->result;
my $req = $result->req;
is lc($req->method), 'patch';
( run in 1.151 second using v1.01-cache-2.11-cpan-d80b1682f3f )