JSON-RPC-Common
view release on metacpan or search on metacpan
examples/http_engine.pl view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use HTTPEx::Declare;
use JSON::RPC::Common::Marshal::HTTP;
interface Standalone => { port => 8000, fork => 1, keepalive => 1 };
my $marshal = JSON::RPC::Common::Marshal::HTTP->new;
run {
my $c = shift;
# decode the request into an object
# this takes the JSON from the body, deserializes, and constructs a call
eval {
my $json_rpc_req = $marshal->request_to_call($c->req);
( run in 0.726 second using v1.01-cache-2.11-cpan-483215c6ad5 )