Import p5-Plack-Middleware-MethodOverride

Writing RESTful 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.

From wen heping <wenheping2000 () hotmail ! com>
OK benoit@
This commit is contained in:
afresh1 2020-08-19 02:11:51 +00:00
parent 0b2663de1d
commit 6881c446d6
4 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,20 @@
# $OpenBSD: Makefile,v 1.1.1.1 2020/08/19 02:11:51 afresh1 Exp $
COMMENT = override REST methods to Plack apps via POST
DISTNAME = Plack-Middleware-MethodOverride-0.20
CATEGORIES = www
MAINTAINER = Wen Heping <wenheping2000@hotmail.com>
# Perl
PERMIT_PACKAGE = Yes
MODULES = cpan
RUN_DEPENDS = www/p5-Plack
TEST_DEPENDS = www/p5-URI
PKG_ARCH = *
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (Plack-Middleware-MethodOverride-0.20.tar.gz) = 2/taLvtIv+sByzrh4cZ34VXce/4hDH5/IhuuPLaqtfE=
SIZE (Plack-Middleware-MethodOverride-0.20.tar.gz) = 12715

View File

@ -0,0 +1,8 @@
Writing RESTful 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.

View File

@ -0,0 +1,3 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2020/08/19 02:11:51 afresh1 Exp $
${P5SITE}/Plack/Middleware/MethodOverride.pm
@man man/man3p/Plack::Middleware::MethodOverride.3p