Middleware class

the handler will return a RequestHolder or ResponseHolder if the return is RequestHolder it will pass it to the next pipeline entity if the return is ResponseHolder it won't be passed to the next pipeline entity the pathTemplate for a middleware can be null, so it will be executed on all paths requested for a router

Inheritance
Implemented types

Constructors

Middleware(String? pathTemplate, HttpMethod method, Processor processor, {String? signature, MiddlewareDoc? doc})

Properties

doc MiddlewareDoc?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
method HttpMethod
this is the method of the handler or middleware not the incoming request method
finalinherited
originalSignature String?
no setterinherited
pathTemplate String?
this is the path of the handler or the middleware not the incoming request path the null pathTemplate means that this Middleware will run on every request no matter it's path but the method will restrict this, if you want to make a global middleware just make the pathTemplate to be null and the method to be HttpMethods.all
finalinherited
processor Processor
this is the function that will be executed when hitting this routing entity
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
self RequestProcessor
no setteroverride
signature String?
no setterinherited

Methods

isMyPath(String askedPath, HttpMethod askedMethod) bool
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processors(String path, HttpMethod method) List<RoutingEntity>
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited