Group
Extension

Matches 2

Mojolicious-Plugin-Qooxdoo ( O/OE/OETIKER/Mojolicious-Plugin-Qooxdoo-1.0.14.tar.gz, OETIKER, 2023; MetaCPAN )
Mojolicious-Plugin-Qooxdoo/lib/Mojolicious/Plugin/Qooxdoo.pm ( view source; MetaCPAN )
} =~ s{/+/$}{/};
    } 
    my $root = ($conf->{prefix} || '/');
    my $path = $conf->{path} || 'jsonrpc';
    my $r = $app->routes;

    if ($conf->{controller}){
        $r->any($root.$path)->to(
 
us';
 use MyJsonRpcController;
 
 sub startup {
    my $self = shift;
       
    $self->plugin('qooxdoo',{
        prefix => '/',
        path => 'jsonrpc',
        controller => 'my_json_rpc_conroll
er'
    });
 }


=head1 DESCRIPTION

To deal with incoming JSON-RPC requests, write a controller using L<Mojolicious::Plugin::Qooxdoo::JsonRpcController>
as a parent, instead of the normal L<Mojolicio
Mojolicious-Plugin-Qooxdoo ( O/OE/OETIKER/Mojolicious-Plugin-Qooxdoo-1.0.14.tar.gz, OETIKER, 2023; MetaCPAN )
Mojolicious-Plugin-Qooxdoo/lib/Mojolicious/Plugin/Qooxdoo/JsonRpcController.pm ( view source; MetaCPAN )
package Mojolicious::Plugin::Qooxdoo::JsonRpcController;

use strict;
use warnings;

use Mojo::JSON qw(encode_json decode_json);
use Mojo::Base 'Mojolicious::Controller';
use Mojo::Promise;
use Storab
   # Data comes as JSON object, so fetch a reference to it
            my $type = $self->req->headers->content_type//'*missing header*';
            if ($type !~ m{^application/json\b}i) {
           
application/json)");
                $self->render(text => "invalid payload format announcement", status=>500);
                return;
            }
            $data = eval { decode_json($self->req-

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