Skip to main content
Module

x/pogo/lib/router.ts>default

Server framework for Deno
Go to Latest
class default
import { default } from "https://deno.land/x/pogo@v0.5.2/lib/router.ts";

A router represents a collection of routes and determines which route will handle a given HTTP request. Use pogo.router() to create a router instance.

Constructors

new
default(
route?: RoutesList,
handler?: RouteHandler,
)

Properties

routes: RoutingTable

Methods

add(
route: RoutesList,
handler?: RouteHandler,
): this
add(): this
add(): this
all(): this
all(
options: RouteOptions,
handler: RouteHandler,
): this
all(): this
delete(
options: RouteOptions,
handler: RouteHandler,
): this
get(): this
get(
options: RouteOptions,
handler: RouteHandler,
): this
get(): this
lookup(
method: string,
path: string,
host?: string,
): MatchedRoute | undefined
patch(
options: RouteOptions,
handler: RouteHandler,
): this
post(): this
post(
options: RouteOptions,
handler: RouteHandler,
): this
post(): this
put(): this
put(
options: RouteOptions,
handler: RouteHandler,
): this
put(): this