Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
class OpenboxRouter
implements RouteHandlerApi
import { OpenboxRouter } from "https://deno.land/x/openbox@1.2.10/mod.ts";

Constructors

new
OpenboxRouter(unnamed 0: { endpoints: OpenboxEndpoints<Routes>; defaultErrorHandler?: OpenboxServerErrorHandler; notFoundHandler?: OpenboxServerNotFoundHandler; })

Methods

addRoute(
path: string,
mediaType: string,
handler: OpenboxServerRouteHandler,
)
complete(_: UnimplementedRoutes<Routes>)
handle(request: Request, connInfo: Deno.ServeHandlerInfo): Promise<Response>
path<P extends Extract<keyof Routes, string>>(path: P): ReturnType<withPath>