snap-extras-0.12.3.0: A collection of useful helpers and utilities for Snap web applications.

Safe HaskellNone
LanguageHaskell2010

Snap.Extras.MethodOverride

Synopsis

Documentation

handleMethodOverride Source #

Arguments

:: MonadSnap m 
=> m a

Internal handler to call

-> m a 

Wrap a handler with method override support. This means that if (and only if) the request is a POST, _method param is passed, and it is a parsable method name, it will change the request method to the supplied one. This works around some browser limitations with forms. If you use a different parameter name than _method, use handleMethodOverride'

handleMethodOverride' Source #

Arguments

:: MonadSnap m 
=> ByteString

parameter name for method

-> m a

Internal handler to call

-> m a