class Kemal::OverrideMethodHandler

Overview

Adds support for _method magic parameter to simulate PUT, PATCH, DELETE requests in an html form.

This middleware is not in the default Kemal handlers. You need to explicitly add this to your handlers:

add_handler Kemal::OverrideMethodHandler

Important: This middleware consumes params.body to read the _method magic parameter.

Included Modules

Defined in:

kemal/override_method_handler.cr

Constant Summary

ALLOWED_METHODS = ["PUT", "PATCH", "DELETE"]
INSTANCE = new
OVERRIDE_METHOD = "POST"
OVERRIDE_METHOD_PARAM_KEY = "_method"

Instance Method Summary

Instance Method Detail

def call(context) #

[View source]