import { default } from "https://deno.land/x/ash@1.3.6/src/Router/Route.ts";
Constructors
new
default(methods: string[],
path: string,
pattern: RegExp,
controller: Controller | Function,
catchall?: boolean,
Creates and configures a Route object.
Static Methods
any(path: string, controller: Controller | Function): Route
Registers a route that matches for the any HTTP method.
delete(path: string, controller: Controller | Function): Route
Registers a route that matches for the HTTP DELETE method.
get(path: string, controller: Controller | Function): Route
Registers a route that matches for the HTTP GET method.
matchRoute(method: string, path: string): RouteMatchResult
Looks for a matching route and returns it.
options(path: string, controller: Controller | Function): Route
Registers a route that matches for the HTTP OPTIONS method.
patch(path: string, controller: Controller | Function): Route
Registers a route that matches for the HTTP PATCH method.
post(path: string, controller: Controller | Function): Route
Registers a route that matches for the HTTP POST method.
put(path: string, controller: Controller | Function): Route
Registers a route that matches for the HTTP PUT method.