Plack::Middleware::MethodOverride
Writing REST
<http://en.wikipedia.org/wiki/Representational_State_Transfer>ful apps
is a good thing, but if you're also trying to support web browsers, it
would be nice not to be reduced to "GET" and "POST" for everything.
This middleware allows for "POST" requests that pretend to be something
else: by adding either a header named "X-HTTP-Method-Override" to the
request, or a query parameter named "x-tunneled-method" to the URI, the
client can say what method it actually meant. That is, as long as it
meant one of these:
* GET
* POST
* HEAD
* PUT
* DELETE
* OPTIONS
* TRACE
* CONNECT
* PATCH
If so, then the "REQUEST_METHOD" in the PSGI environment will be
replaced with the client's desired value. The original request method is
always stored under the "plack.original_request_method" key.
INSTALLATION
This is a Perl module distribution. It should be installed with whichever
tool you use to manage your installation of Perl, e.g. any of
cpanm .
cpan .
cpanp -i .
Consult http://www.cpan.org/modules/INSTALL.html for further instruction.
Should you wish to install this module manually, the procedure is
perl Makefile.PL
make
make test
make install
Copyright and License
This software is copyright (c) 2015 by Tatsuhiko Miyagawa, David E.
Wheeler, Aristotle Pagaltzis.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.