(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 docs for details.
Example:
(router ["/api" {:middleware [wrap-format wrap-oauth2]} ["/users" {:middleware [wrap-delete] :handler get-user}]])
Options:
key | description |
---|---|
:reitit.middleware/transform | Function of [Middleware] => [Middleware] to transform the expanded Middleware (default: identity). |
:reitit.middleware/registry | Map of keyword => IntoMiddleware to replace keyword references into Middleware |
See other router options from reitit.core/router
.
Creates a [[reitit.core/Router]] from raw route data and optionally an options map with support for Middleware. See [docs](https://metosin.github.io/reitit/) for details. Example: (router ["/api" {:middleware [wrap-format wrap-oauth2]} ["/users" {:middleware [wrap-delete] :handler get-user}]]) Options: | key | description | | -------------------------------|-------------| | `:reitit.middleware/transform` | Function of `[Middleware] => [Middleware]` to transform the expanded Middleware (default: identity). | `:reitit.middleware/registry` | Map of `keyword => IntoMiddleware` to replace keyword references into Middleware See other router options from [[reitit.core/router]].
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close