route_stack | R Documentation |
This function allows you to combine multiple routes into a stack in order to
dispatch on them until one of them returns FALSE
. This allows you to have a
router that can pass a request through multiple handlers before sending it
along to the client or other middleware
route_stack(x, ...)
## Default S3 method:
route_stack(x, ...)
## S3 method for class 'Route'
route_stack(x, ...)
## S3 method for class 'AssetRoute'
route_stack(x, ...)
## S3 method for class 'RouteStack'
route_stack(x, ..., .after = NULL)
x |
A Route or RouteStack object |
... |
one or more named Route objects |
.after |
Where in the stack should the new routes be placed. |
A RouteStack object. If x
is a RouteStack then this will be
returned, modified.
# Create an empty route stack
route_stack()
# Stack a route with another, returning a RouteStack
route(all = list("*" = function(...) TRUE)) |>
route_stack(
limit = sizelimit_route()
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.