App-CamelPKI
view release on metacpan or search on metacpan
t/lib/App/CamelPKI/Test.pm view on Meta::CPAN
=cut
sub plaintextcall_remote {
my ($url, @args) = @_;
my $req = http_request_prepare($url, @args);
my $res = http_request_execute($req, @args);
die sprintf("plain request at $url failed with code %d\n%s\n",
$res->code, $res->content)
unless $res->is_success;
die sprintf("plain request at $url returned a %s document\n%s\n",
$res->header("content-type"), $res->content)
unless $res->header("content-type") =~ m|^text/plain|;
return $res->content;
}
=item I<jsoncall_local ($uri, $struct)>
Sends the $struct data structure (which is typically a reference to a
hash) to the Catalyst dispatcher via a JSON request at $url URL, en
returns the return value given by the controller. The
L<Catalyst::Test> must have been loaded previously.
( run in 1.143 second using v1.01-cache-2.11-cpan-524268b4103 )