Random utils, Reitit support functions.
Random utils, Reitit support functions.
The Identifiable protocol describes operations on path or route ID/name data.
The Identifiable protocol describes operations on path or route ID/name data.
(match r)(match id r)(match id params r)Converts or coerces the given argument to a Match.
Converts or coerces the given argument to a Match.
(match? r)Returns true if the given argument is a Match object.
Returns true if the given argument is a Match object.
(path req-or-match)(path req-or-router name-or-path)(path req-or-router name-or-path path-params)For the given request map, a Reitit match object, or a Reitit router, returns the path of a route for the current path or for a path specified by its unique identifier or a string. Optionally path params map can be given if the path supports path params.
For the given request map, a Reitit match object, or a Reitit router, returns the path of a route for the current path or for a path specified by its unique identifier or a string. Optionally path params map can be given if the path supports path params.
(req-or-route-param req-or-match param)(req-or-route-param req-or-router param default)Works like io.randomseed.utils.reitit.http/route-data-param but first tries to get the parameter from a request map, if the first argument is a request map.
Works like io.randomseed.utils.reitit.http/route-data-param but first tries to get the parameter from a request map, if the first argument is a request map.
The Routable protocol describes operations on route-related data.
The Routable protocol describes operations on route-related data.
(router r)Converts or coerces the given argument to a Router.
Converts or coerces the given argument to a Router.
(router? r)Returns true if the given argument is a Router object.
Returns true if the given argument is a Router object.
(route-conflicting? req-or-match)(route-conflicting? req-or-router name-or-path)(route-conflicting? req-or-router name-or-path path-params)For the given request map, a Reitit match object, or a Reitit router, returns true if a route (for the path specified by its unique identifier or a string) is marked as conflicting. Optionally path params map can be given if the path supports path params.
For the given request map, a Reitit match object, or a Reitit router, returns true if a route (for the path specified by its unique identifier or a string) is marked as conflicting. Optionally path params map can be given if the path supports path params.
(route-data req-or-match)(route-data req-or-router name-or-path)(route-data req-or-router name-or-path path-params)For the given request map, a Reitit match object, or a Reitit router, returns a route data map for the current path or for the path specified by its unique identifier or a string. Optionally path params map can be given if the path supports path params.
For the given request map, a Reitit match object, or a Reitit router, returns a route data map for the current path or for the path specified by its unique identifier or a string. Optionally path params map can be given if the path supports path params.
(route-data-param req-or-match param)(route-data-param req-or-router param name-or-path)(route-data-param req-or-router param name-or-path path-params)For the given request map, a Reitit match object, or a Reitit router, returns the requested parameter of a route data map for the current path or for the path specified by its unique identifier or a string. Optionally path params map can be given if the path supports path params.
For the given request map, a Reitit match object, or a Reitit router, returns the requested parameter of a route data map for the current path or for the path specified by its unique identifier or a string. Optionally path params map can be given if the path supports path params.
(route-handler req-or-match)(route-handler req-or-router name-or-path)(route-handler req-or-router name-or-path path-params)For the given request map, a Reitit match object, or a Reitit router, returns a handler of a route for the path specified by its unique identifier or a string. Optionally path params map can be given if the path supports path params.
For the given request map, a Reitit match object, or a Reitit router, returns a handler of a route for the path specified by its unique identifier or a string. Optionally path params map can be given if the path supports path params.
(route-middleware req-or-match)(route-middleware req-or-router name-or-path)(route-middleware req-or-router name-or-path path-params)For the given request map, a Reitit match object, or a Reitit router, returns a middleware chain of a route for the path specified by its unique identifier or a string. Optionally path params map can be given if the path supports path params.
For the given request map, a Reitit match object, or a Reitit router, returns a middleware chain of a route for the path specified by its unique identifier or a string. Optionally path params map can be given if the path supports path params.
(route-name req-or-match)(route-name req-or-router name-or-path)(route-name req-or-router name-or-path path-params)For the given request map, a Reitit match object, or a Reitit router, returns a unique name of a route for the path specified by its unique identifier or a string. Optionally path params map can be given if the path supports path params.
For the given request map, a Reitit match object, or a Reitit router, returns a unique name of a route for the path specified by its unique identifier or a string. Optionally path params map can be given if the path supports path params.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |