diff --git a/middleware/method_override.go b/middleware/method_override.go index 25ec1f935..17335a902 100644 --- a/middleware/method_override.go +++ b/middleware/method_override.go @@ -19,7 +19,10 @@ type MethodOverrideConfig struct { Getter MethodOverrideGetter } -// MethodOverrideGetter is a function that gets overridden method from the request +// MethodOverrideGetter is a function that gets overridden method from the request. +// The returned value should be a standard HTTP method name as used by net/http +// (e.g. http.MethodDelete, "DELETE"). The middleware does not normalize case or +// trim spaces — callers / Getter implementations should return a valid method. type MethodOverrideGetter func(c *echo.Context) string // DefaultMethodOverrideConfig is the default MethodOverride middleware config.