Handler class

the handler will return a ResponseHolder the handler itself can have some middlewares that will be executed before it as a local middlewares the pathTemplate of a handler can't be null the handler processor should return the ResponseHolder as the final stage of the pipeline because the pipeline will be closed after the handler processor runs

Inheritance
Implemented types

Constructors

Handler(String pathTemplate, HttpMethod method, Processor processor, {List<Middleware> middlewares = const [], String? signature, HandlerDoc? docs})

Properties

doc HandlerDoc
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
middlewares List<Middleware>
final
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
final
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

addLocalMiddleware(Processor processor) Handler
local middlewares will run only for this handler and won't have any effect on other handlers
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
setDoc() → void
toString() String
A string representation of this object.
inherited

Operators

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