Plack::Middleware::RestAPI - DEPRECATED use Plack::App::REST instead
Version 0.01
use Plack::Middleware::RestAPI; use Test::Root; builder { mount "/api" => builder { enable 'RestAPI'; mount "/" => sub { 'Test::Root' }; }; }; package Test::Root; sub GET { return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'app/root' ] ]; }
This modul is DEPRECATED use Plack::App::REST instead.
Plack::Middleware::RestAPI is simple middleware that call requested method directly from mounted class.
Method can be GET, PUT, POST, DELETE, HEAD.
For complete RestAPI in Perl use:
Plack::Middleware::ParseContent
Plack::Middleware::SetAccept
Plack::Middleware::FormatOutput
Store name of called class.
http://psgirestapi.dovrtel.cz/
Vaclav Dovrtel, <vaclav.dovrtel at gmail.com>
<vaclav.dovrtel at gmail.com>
Please report any bugs or feature requests to github repository.
Inspired by https://github.com/towhans/hochschober
https://github.com/vasekd/Plack-Middleware-RestAPI
Copyright 2015 Vaclav Dovrtel.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Plack::Middleware::RestAPI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Plack::Middleware::RestAPI
CPAN shell
perl -MCPAN -e shell install Plack::Middleware::RestAPI
For more information on module installation, please visit the detailed CPAN module installation guide.