import { Router } from "https://deno.land/x/oak@v17.1.2/router.ts";
Register named middleware for the specified routes when specified methods are requested.
Parameters
methods: HTTPMethods[] | HTTPMethods
path: R
middleware: RouterMiddleware<R, P, S>
...middlewares: RouterMiddleware<R, P, S>[]
Register middleware for the specified routes when the specified methods is requested.
Parameters
methods: HTTPMethods[] | HTTPMethods
path: R
middleware: RouterMiddleware<R, P, S>
...middlewares: RouterMiddleware<R, P, S>[]
Register middleware for the specified routes when the specified methods are requested with explicit path parameters.
Type Parameters
P extends RouteParams<string>
optional
S extends State = RSParameters
methods: HTTPMethods[] | HTTPMethods
pathOrMiddleware: string | RouterMiddleware<string, P, S>
...middleware: RouterMiddleware<string, P, S>[]