Module

x/oak/mod.ts>RouteContext

A middleware framework for handling HTTP with Deno 🐿️ 🦕
Extremely Popular
Go to Latest
class RouteContext
extends ServeContext<S>
import { RouteContext } from "https://dotland.deno.dev/x/oak@v13.2.5/mod.ts";

Constructors

new
RouteContext(context: RouterContext<R, P, S>)

Type Parameters

R extends string
optional
P extends RouteParams<R> = RouteParams<R>
optional
S extends State = State

Properties

readonly
captures: string[]

When matching the route, an array of the capturing groups from the regular expression.

readonly
matched: Layer<R, P, S>[] | undefined

The routes that were matched for this request.

readonly
params: P

Any parameters parsed from the route when matched.

readonly
routeName: string | undefined

If the matched route has a name, the matched route name is provided here.

readonly
router: Router<S>

A reference to the router instance.

readonly
routerPath: string | undefined

Overrides the matched path for future route middleware, when a routerPath option is not defined on the Router options.

Methods

[Symbol.for("Deno.customInspect")](inspect: (value: unknown) => string): string
[Symbol.for("nodejs.util.inspect.custom")](
depth: number,
options: any,
inspect: (value: unknown, options?: unknown) => string,
): any