Documentation ¶
Overview ¶
Method implements the ability to override HTTP methods This package was created from github.com/codegangsta/martini-contrib/method and modified to work with the echo framework
Index ¶
Constants ¶
const HeaderHTTPMethodOverride = "X-HTTP-Method-Override"
HeaderHTTPMethodOVerride is a common HTTP header used to override the HTTP method
const ParamHTTPMethodOverride = "_method"
ParamHTTPMethodOverride is a common used HTTML form parameter used to override the HTTP method
Variables ¶
var ErrInvalidOverrideMethod = errors.New("invalid override method")
ErrInvalidOverrideMethod is returned when an invalid http method was given to OverrideRequestMethod.
Functions ¶
func Override ¶
func Override() echo.HandlerFunc
Override checks for the X-HTTP-Method-Override header or the HTML for parameter, `_method` and uses (if valid) the http method instead of Request.Method. This is especially useful for http clients that don't support many http verbs. It isn't secure to override e.g a GET to a POST, so only Request.Method which are POSTs are considered.
Types ¶
This section is empty.