Skip to content

Perl PSGI middleware that just call GET, PUT, POST, DELETE on mounted class.

License

Notifications You must be signed in to change notification settings

vasekd/Plack-Middleware-RestAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME

Plack::Middleware::RestAPI - DEPRECATED use Plack::App::REST instead

VERSION

Version 0.01

SYNOPSIS

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' ] ];
}

DESCRIPTION

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

STORED PARAMS TO ENV (Fulfill the PSGI specification)

restapi.class

Store name of called class.

TUTORIAL

http://psgirestapi.dovrtel.cz/

AUTHOR

Vaclav Dovrtel, <vaclav.dovrtel at gmail.com>

BUGS

Please report any bugs or feature requests to github repository.

ACKNOWLEDGEMENTS

Inspired by https://github.com/towhans/hochschober

REPOSITORY

https://github.com/vasekd/Plack-Middleware-RestAPI

LICENSE AND COPYRIGHT

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.

About

Perl PSGI middleware that just call GET, PUT, POST, DELETE on mounted class.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages