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 { _