mirror of
https://github.com/typeable/wai.git
synced 2025-01-07 14:51:40 +03:00
commit
2ed89f1a17
@ -9,7 +9,7 @@ import Control.Monad (join)
|
||||
-- | Allows overriding of the HTTP request method via the _method query string
|
||||
-- parameter.
|
||||
--
|
||||
-- This middlware only applies when the initial request method is POST. This
|
||||
-- This middleware only applies when the initial request method is POST. This
|
||||
-- allow submitting of normal HTML forms, without worries of semantics
|
||||
-- mismatches in the HTTP spec.
|
||||
methodOverride :: Middleware
|
||||
|
@ -23,7 +23,7 @@ import Data.Conduit.List (sourceList)
|
||||
-- then it changes the request-method to the value of that
|
||||
-- parameter.
|
||||
--
|
||||
-- * This middlware only applies when the initial request method is POST.
|
||||
-- * This middleware only applies when the initial request method is POST.
|
||||
--
|
||||
methodOverridePost :: Middleware
|
||||
methodOverridePost app req = case (requestMethod req, lookup "Content-Type" (requestHeaders req)) of
|
||||
|
Loading…
Reference in New Issue
Block a user