* Dancer::Plugin::RPC ==> Example

* This example app has 5 functions grouped in 2 groups:
    system:   ping, version, status, list_methods
    metacpan: search (query => $query)
These 5 functions are reachable with 3 different protocols (xmlrpc, jsonrpc2
and restrpc) on the same daemon.

* Dependencies
This example code uses some extra dependencies, I've stated all of them in the cpanfile.
To install these dependencies in the local directory using Carton:

    $ cd example
    $ carton install

This installs all dependencies in the example/local directory.

* Start Example app
Start the Example daemon (simple way):

    $ cd example
    $ carton exec -- bin/example.pl start

* Testing Example app
Testing the daemon (with example/bin/do-rpc):

    $ cd example

Any of:

    $ carton exec -- bin/do-rpc -t xmlrpc -u http://localhost:3000/system -c ping
    $ carton exec -- bin/do-rpc -t jsonrpc -u http://localhost:3000/system -c ping
    $ carton exec -- bin/do-rpc -t restrpc -u http://localhost:3000/system/ping

    $ carton exec -- bin/do-rpc -t xmlrpc -u http://localhost:3000/system -c version
    $ carton exec -- bin/do-rpc -t jsonrpc -u http://localhost:3000/system -c version
    $ carton exec -- bin/do-rpc -t restrpc -u http://localhost:3000/system/version

    $ carton exec -- bin/do-rpc -t xmlrpc -u http://localhost:3000/system -c status
    $ carton exec -- bin/do-rpc -t jsonrpc -u http://localhost:3000/system -c status
    $ carton exec -- bin/do-rpc -t restrpc -u http://localhost:3000/system/status

    $ carton exec -- bin/do-rpc -t xmlrpc -u http://localhost:3000/system -c list_methods
    $ carton exec -- bin/do-rpc -t jsonrpc -u http://localhost:3000/system -c list_methods
    $ carton exec -- bin/do-rpc -t restrpc -u http://localhost:3000/system/list_methods

    $ carton exec -- bin/do-rpc -t xmlrpc -u http://localhost:3000/metacpan -c search query Dancer2::Plugin::RPC
    $ carton exec -- bin/do-rpc -t jsonrpc -u http://localhost:3000/metacpan -c search query Dancer2::Plugin::RPC
    $ carton exec -- bin/do-rpc -t restrpc -u http://localhost:3000/metacpan/search query Dancer2::Plugin::RPC

* Stop Example app
Stop the Example daemon (simple way):

    $ cd example
    $ carton exec -- bin/example.pl stop