Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/cav/router.ts

A server framework for Deno
Go to Latest
import * as cav from "https://deno.land/x/cav@0.0.24/router.ts";

Functions

Checks if the Response is a "did match" Response, i.e. the handler it came from wants this Response to be returned to the client.

Adds a Symbol to the Response to indicate to any containing Routers that the handler didn't match with the Request. The Router will continue looking for matches.

Constructs a new Router handler using the provided routes. The route properties are also available on the returned Router function.

Hook for getting routing metadata from a Request. If there isn't already a RouterContext associated with the Request, a new one will be generated. The same RouterContext object is returned on every subsequent call to routerContext() with this Request.

Interfaces

Metadata object for caching and tracking information about how a Request has been routed so far in the handling process.

Type Aliases

Record representing path groups captured during routing.

Record representing query string parameters.

Cav Router handlers, for routing requests.