Reitit also support for Pedestal-style interceptors as an alternative to using middleware. Basic interceptor handling is implemented in reitit.interceptor
package. There is no interceptor executor shipped, but you can use libraries like Pedestal Interceptor or Sieppari to execute the chains.
Work-in-progress and considered alpha quality.
[metosin/reitit-http "0.2.1"]
An module for http-routing using interceptors instead of middleware. Builds on top of the reitit-ring
module. The differences:
:middleware
, uses :interceptors
reitit.http/http-router
takes an extra options map with mandatory key :executor
(of type reitit.interceptor/Executor
) and optional top level :interceptors
- wrapping both routes and default handler.reitit.http/routing-interceptor
to provide a routing interceptor, to be used with Pedestal.See code at: https://github.com/metosin/reitit/tree/master/examples/http
See example at: https://github.com/metosin/reitit/tree/master/examples/pedestal
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close