Skip to main content
Module

x/deno_api_server/mod.ts>Route

API Server for deno for functional programmed endpoints
Go to Latest
class Route
implements IRoute
import { Route } from "https://deno.land/x/deno_api_server@v0.6.3/mod.ts";

Constructors

new
Route(method: string[] | string, uri: IMatcher | URLPattern | string)

Properties

protected
pipes: Function[]
di: IInjections
readonly
matcher: IMatcher
readonly
methods: string[]
optional
parent: any
readonly
props: IStateMap

Methods

addPipe(pipe: IPipe): IRoute

add route pipe

execute(
url: URL,
request: IRequest,
response: IResponse,
): Promise<IContext>

execute all pipes for current request

inject(
name: string,
service: any,
overridable?: boolean,
)
injections(di: IInjections): Route

injection of service

isMatch(url: URL): boolean
prop(name: string, value: any)

route props