Skip to main content
The Deno 2 Release Candidate is here
Learn more
class HttpRouter
import { HttpRouter } from "https://deno.land/x/sptaki@1.2.0/routers/HttpRouter.d.ts";

Constructors

new
HttpRouter(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[])

Properties

protected
dynamicRoutes: DynamicRouter[]
protected
staticRouters: StaticRouter[]

Methods

protected
groupBy<T>(list: T[], keyGetter: (t: T) => string): Map<string, T[]>
protected
handleRoute(
url: string,
info: any,
sessionID: string,
wrapper: ResponseWrapper,
routers: Router[],
dynamic: boolean,
): boolean
getResponse(
info: any,
sessionID: string,
): string