import { Middleware } from "https://deno.land/x/duck_web_framework@0.1.1/mod.ts";
Constructors
new
Middleware(handler: MiddlewareFunction | ErrorMiddlewareFunction, endpoint?: Endpoint)Properties
private
optional
endpoint: Endpointhandler: MiddlewareFunction | ErrorMiddlewareFunction
Methods
private
matches(request: DuckRequest): booleansetParams(req: DuckRequest): void
Sets request parameters, based on request URL and this endpoint's path
Static Methods
findMatching(middlewares: Middleware[], request: DuckRequest): Middleware[]
Returns middlewares from given collection, that match given request (based on path and method)