Group
Extension

Matches 1

Mojolicious-Plugin-JSONRPC2 ( P/PO/POWERMAN/Mojolicious-Plugin-JSONRPC2-v2.0.4.tar.gz, POWERMAN, 2021; MetaCPAN )
Mojolicious-Plugin-JSONRPC2/lib/Mojolicious/Plugin/JSONRPC2.pm ( view source; MetaCPAN )
age Mojolicious::Plugin::JSONRPC2;

use Mojo::Base 'Mojolicious::Plugin';
use Carp;

our $VERSION = 'v2.0.4';

use JSON::XS;
# to ensure callback runs on notification
use JSON::RPC2::Server 0.004000;
 => 200;
use constant HTTP_204   => 204;
use constant HTTP_415   => 415;

my $Type = 'application/json';
my %HEADERS = (
    'Content-Type' => qr{\A\s*\Q$Type\E\s*(?:;|\z)}msi,
    'Accept' => qr{(?:\
;

    $app->helper(jsonrpc2_headers => sub { return %HEADERS });

    $app->routes->add_shortcut(jsonrpc2     => sub { _shortcut('POST', @_) });
    $app->routes->add_shortcut(jsonrpc2_get => sub { _

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