amelinium.http
added in 1.0.0
amelinium service, http handling.
Datable
protocol
members
get-route-data
(get-route-data req-or-match)
(get-route-data req-or-match param)
(get-route-data req match param)
match
(match r)
(match id r)
(match id params r)
Converts or coerces the given argument to a Match.
path
(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.
req-or-route-param
(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.
route-conflicting?
(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.
route-data
(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.
route-data-param
(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.
route-handler
(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.
route-middleware
(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.
route-name
(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.