import { Router } from "https://dotland-vbqsvsrpfncg.deno-staging.dev/x/oak@v17.1.3/router.ts?p=prototype.add&s=Router";
Register named middleware for the specified routes when specified methods are requested.
Type Parameters
R extends string[src]
optional
P extends RouteParams<R> = RouteParams<R>[src]Parameters
methods: HTTPMethods[] | HTTPMethods[src]
name: string[src]
middleware: RouterMiddleware<R, P, S>[src]
...middlewares: RouterMiddleware<R, P, S>[][src]
Register middleware for the specified routes when the specified methods is requested.
Type Parameters
R extends string[src]
optional
P extends RouteParams<R> = RouteParams<R>[src]Parameters
methods: HTTPMethods[] | HTTPMethods[src]
middleware: RouterMiddleware<R, P, S>[src]
...middlewares: RouterMiddleware<R, P, S>[][src]
Register middleware for the specified routes when the specified methods are requested with explicit path parameters.
Type Parameters
P extends RouteParams<string>[src]
Parameters
methods: HTTPMethods[] | HTTPMethods[src]
nameOrPath: string[src]
pathOrMiddleware: string | RouterMiddleware<string, P, S>[src]
...middleware: RouterMiddleware<string, P, S>[][src]