Back

router (clj)

(source)

function

(router data) (router data opts)
Creates a [[reitit.core/Router]] from raw route data and optionally an options map with support for Interceptors. See documentation on [[reitit.core/router]] for available options. In addition, the following options are available: Options: | key | description | --------------------------------|------------- | `:reitit.interceptor/transform` | Function or vector of functions of type `[Interceptor] => [Interceptor]` to transform the expanded Interceptors (default: identity). | `:reitit.interceptor/registry` | Map of `keyword => IntoInterceptor` to replace keyword references into Interceptor Example: (router ["/api" {:interceptors [format-body oauth2]} ["/users" {:interceptors [delete] :handler get-user}]])

Examples