RouteHandlerFunction
To learn how to use RouteHandlerFunction, see Server-Side Routing.
RouteHandlerFunction takes:
It returns a RouteHandlerViewResponse.
A ViewRequest object has to have:
- a URL
- a path (
requestPath)
ViewRequest can optionally have any number of:
- parameters (
params) - queries (
query)
For example, the ViewRequest object for the request get http://www.example.com/custom/thing?sort=desc looks like this.
A HandlerContext object has to have:
- a route in the form of an
LwrRouteor anLwrErrorRouteobject - a
RouteHandlerViewApicall
The RouteHandlerViewApi calls the functions:
hasViewResponse- Takes a
RouteHandlerViewand aRecord - Returns a boolean
- Takes a
getViewResponse- Takes a
RouteHandlerViewand aRecord - Returns a
RouteHandlerViewResponseorundefined
- Takes a
A RouteHandlerView object has this syntax:
See Also