(chain middleware handler)
(chain middleware handler data)
(chain middleware handler data opts)
Creates a Ring middleware chain out of sequence of IntoMiddleware and Handler. Optional takes route data and (Router) opts.
Creates a Ring middleware chain out of sequence of IntoMiddleware and Handler. Optional takes route data and (Router) opts.
(compile-result route opts)
(compile-result [path {:keys [middleware handler] :as data}] opts scope)
(router data)
(router data opts)
Creates a reitit.core/Router
from raw route data and optionally an options map with
support for Middleware. See documentation on reitit.core/router
for available options.
In addition, the following options are available:
key | description |
---|---|
:reitit.middleware/transform | Function or vector of functions of type [Middleware] => [Middleware] to transform the expanded Middleware (default: identity) |
:reitit.middleware/registry | Map of keyword => IntoMiddleware to replace keyword references into Middleware |
Example:
(router
["/api" {:middleware [wrap-format wrap-oauth2]}
["/users" {:middleware [wrap-delete]
:handler get-user}]])
Creates a [[reitit.core/Router]] from raw route data and optionally an options map with support for Middleware. See documentation on [[reitit.core/router]] for available options. In addition, the following options are available: | key | description | -------------------------------|------------- | `:reitit.middleware/transform` | Function or vector of functions of type `[Middleware] => [Middleware]` to transform the expanded Middleware (default: identity) | `:reitit.middleware/registry` | Map of `keyword => IntoMiddleware` to replace keyword references into Middleware Example: (router ["/api" {:middleware [wrap-format wrap-oauth2]} ["/users" {:middleware [wrap-delete] :handler get-user}]])
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close