wai-extra-3.1.14: Provides some basic WAI handlers and middleware.

Safe Haskell | None
Language | Haskell2010

Network.Wai.Middleware.MethodOverridePost

Description

Changes the request-method via first post-parameter _method.

Synopsis

- methodOverridePost :: Middleware

# Documentation

methodOverridePost :: Middleware #

Allows overriding of the HTTP request method via the _method post string parameter.

- Looks for the Content-Type requestHeader.
- If the header is set to application/x-www-form-urlencoded and the first POST parameter is _method then it changes the request-method to the value of that parameter.
- This middleware only applies when the initial request method is POST.