MethodOverrideMiddleware class final
HTML forms and multipart uploads can only POST: _method or the
X-HTTP-Method-Override header names the real verb, as Symfony's
Request::getMethod() reads them.
Only form bodies are read, so JSON and raw uploads stay untouched. Symfony takes any verb but GET, HEAD, CONNECT and TRACE; this takes the three that forms need.
- Implemented types
Constructors
- MethodOverrideMiddleware({bool keepRawBody = false})
-
Reads
_methodfrom aPOSTform, as Laravel does for HTML forms.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- keepRawBody → bool
-
Whether a form's raw bytes are kept for
Request.bodyStream().final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
handle(
Request request, Next next) → Future< Response> -
Handles
request: return a response, or callnextto continue.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited