Group
Extension

Matches 1

Atto ( R/RO/ROBN/Atto-0.005.tar.gz, ROBN, 2023; MetaCPAN )
Atto/lib/Atto.pm ( view source; MetaCPAN )
CT: A tiny microservice builder

use 5.008001;
use warnings;
use strict;

use Carp qw(croak);
use JSON::MaybeXS ();
use WWW::Form::UrlEncoded qw(parse_urlencoded);
use Plack::Request;

my %methods_for
hod} = $coderef;
    }

    my $json = JSON::MaybeXS->new->utf8->allow_nonref;

    my $response = sub {
        my ($code, $raw) = @_;
        my $body = [ eval { $json->encode($raw) } ];
        if 
        $code = 500;
            $body = [ $json->encode("couldn't encode response: $@") ];
        }

        [ $code, [ 'Content-type' => 'application/json' ], $body ]
    };

    sub {
        my (

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.