Group
Extension

Matches 1

Dancer-Plugin-REST ( Y/YA/YANICK/Dancer-Plugin-REST-0.11.tar.gz, YANICK, 2014; MetaCPAN )
Dancer-Plugin-REST/lib/Dancer/Plugin/REST.pm ( view source; MetaCPAN )

use Carp 'croak';
use Dancer ':syntax';
use Dancer::Plugin;

my $content_types = {
    json => 'application/json',
    yml  => 'text/x-yaml',
    xml  => 'application/xml',
};

our $default_serialize
(
        ($conf && exists $conf->{serializers})
        ? $conf->{serializers}
        : { 'json' => 'JSON',
            'yml'  => 'YAML',
            'xml'  => 'XML',
            'dump' => 'Dumper',
format' => sub {
        User->find(params->{id});
    };

    # curl http://mywebservice/user/42.json
    { "id": 42, "name": "John Foo", email: "john.foo@example.com"}

    # curl http://mywebservic

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