const classdraft::Router

sys::Obj
  draft::Router

Router handles routing URIs to method handlers.

groups

Source

const RouteGroup[] groups := RouteGroup[,]

RouteGroup configuration.

make

Source

new make(|This f)

Constructor.

match

Source

RouteMatch? match(Uri uri, Str method)

Match a request to Route. If no matches are found, returns null. The first route that matches is chosen. Routes from groups are matched before routes. Literal routes are matched before parameterized routes.

routes

Source

const Route[] routes := Route[,]

Route configuration.