Marten::Middleware::MethodOverride
Inherits Marten::Middleware / Reference / Object
Overrides the HTTP method of a request.
This middleware overrides the HTTP method of a incoming request that include a _method field
(in form data or URL-encoded data) or a X-Http-Method-Override header,
enabling the use of HTTP methods beyond GET and POST in HTML forms.
For example a POST request with _method=DELETE in its body would be treated as a DELETE request.
Instance methods
Calls the middleware for a given HTTP request and returns a HTTP response.
This method must be implemented by subclasses: it takes a request argument (the current HTTP request) and a
get_response proc that allows to get the final response. This proc might actually call the next middleware in
the chain of configured middlewares, or the final matched handler. That way, the current middleware have the
ability to intercept any incoming request and the associated response, and to modify them if applicable.