HttpRoute
Up and coming: shot check knows this class and its members today, and programs run it once the native runtime lands.
Up and coming
Nest routes with :name parameters, and guard a whole branch of them at once.
HttpServer's Route(path) gives one, and its own Route nests another: "shop", then "items/:name". A request's Params hold the :name parts and Rest what is left of the path past the matched route. A Guard runs before every handler under its route, and a Response it returns answers instead.
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| Path | string | The full path from the server's root. | |
| Handler | ((request: Request) -> Response | string)? |
Methods
| Name | Arguments | Returns | Description |
|---|---|---|---|
| Route | (path: string, handler: ((request: Request) -> Response | string)?) | HttpRoute | Nests a route under this one; the :name parts of its path reach the handler in the request's Params. |
| Guard | (check: (request: Request) -> Response?) | () | Runs the check before every handler under this route; a Response it returns answers instead. |
From ShotInstance 33
ClassNameNameParentAncestryChangedAttributeChangedChangedChildAddedChildRemovedDestroyingAddTagClearAllChildrenCloneDestroyFindFirstAncestorFindFirstAncestorOfClassFindFirstAncestorWhichIsAFindFirstChildFindFirstChildOfClassFindFirstChildWhichIsAGetAttributeGetAttributeChangedSignalGetAttributesGetChildrenGetDescendantsGetFullNameGetPropertyChangedSignalGetTagsHasTagIsAIsAncestorOfIsDescendantOfRemoveTagSetAttribute
