(chain interceptors)
(chain interceptors data)
(chain
interceptors
data
{:keys [:reitit.interceptor/transform] :or {transform identity} :as opts})
Creates a Interceptor chain out of sequence of IntoInterceptor Optionally takes route data and (Router) opts.
Creates a Interceptor chain out of sequence of IntoInterceptor Optionally takes route data and (Router) opts.
(compile-result route opts)
(compile-result [_ {:keys [interceptors handler] :as data}]
{:keys [:reitit.interceptor/queue] :as opts}
_)
(queue this interceptors)
takes a sequence of interceptors and compiles them to queue for the executor
takes a sequence of interceptors and compiles them to queue for the executor
(execute this interceptors request)
(execute this interceptors request respond raise)
executes the interceptor chain with a request
executes the interceptor chain with a request
(enqueue this context interceptors)
enqueues the interceptors into the queue
enqueues the interceptors into the queue
(router data)
(router data opts)
Creates a reitit.core/Router
from raw route data and optionally an options map with
support for Interceptors. See docs for details.
Example:
(router ["/api" {:interceptors [format-body oauth2]} ["/users" {:interceptors [delete] :handler get-user}]])
Options:
key | description |
---|---|
:reitit.interceptor/transform | Function of [Interceptor] => [Interceptor] to transform the expanded Interceptors (default: identity). |
:reitit.interceptor/registry | Map of keyword => IntoInterceptor to replace keyword references into Interceptor |
See router options from reitit.core/router
.
Creates a [[reitit.core/Router]] from raw route data and optionally an options map with support for Interceptors. See [docs](https://metosin.github.io/reitit/) for details. Example: (router ["/api" {:interceptors [format-body oauth2]} ["/users" {:interceptors [delete] :handler get-user}]]) Options: | key | description | --------------------------------|------------- | `:reitit.interceptor/transform` | Function of [Interceptor] => [Interceptor] to transform the expanded Interceptors (default: identity). | `:reitit.interceptor/registry` | Map of `keyword => IntoInterceptor` to replace keyword references into Interceptor See router options from [[reitit.core/router]].
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close