Catalyst-Plugin-Server-JSONRPC

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    "$c->req->jsonrpc".

    Directly after, it will find out the Path of the Action to dispatch to,
    by splitting methodName by ".":

      methodName: hello.world
      path      : /hello/world

    From this point, it will dispatch to '/hello/world' when it exists, like
    Catalyst Urls would do. What means: you will be able to set Regexes,
    Paths etc on subroutines to define the endpoint.

    We discuss these custom JSONRPC attributes below.

    When the request is dispatched, we will return $c->stash->{jsonrpc} to
    the jsonrpc client, or, when it is not available, it will return
    $c->stash to the client. There is also a way of defining $c->stash keys
    to be send back to the client.

ATTRIBUTES
    You can mark any method in your Catalyst application as being available

lib/Catalyst/Plugin/Server/JSONRPC.pm  view on Meta::CPAN

an OBJECT containing JSONRPC specific parameters in C<< $c->req->jsonrpc >>.

Directly after, it will find out the Path of the Action to dispatch to, by
splitting methodName by C<.>:

  methodName: hello.world
  path      : /hello/world

From this point, it will dispatch to '/hello/world' when it exists,
like Catalyst Urls would do. What means: you will be able to set Regexes,
Paths etc on subroutines to define the endpoint.

We discuss these custom JSONRPC attributes below.

When the request is dispatched, we will return $c->stash->{jsonrpc} to the
jsonrpc client, or, when it is not available, it will return $c->stash to
the client. There is also a way of defining $c->stash keys to be send back
to the client.

=head1 ATTRIBUTES

lib/JSON/RPC/Common/Marshal/Catalyst.pm  view on Meta::CPAN


JSON::RPC::Common::Marshal::Catalyst - Convert L<Catalyst::Request> 
to L<JSON::RPC::Common:Call>.

Based on L<JSON::RPC::Common::Marshal::HTTP>. Only one method has been overriden.

=head1 SYNOPSIS

	use JSON::RPC::Common::Marshal::Catalyst;

	sub simple_json_endpoint : Local {
		my ($self, $c, @args) = @_;
		my $m = JSON::RPC::Common::Marshal::Catalyst->new;
		my $call = $m->request_to_call($c->req);
		my $res = $call->call($self);
		$m->write_result_to_response($c->res);
	}

=head1 DESCRIPTION

This object provides marshalling routines to convert L<Catalyst::Request> 

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.921 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )