(definterceptor ?sym & ?attrs)
Defines an interceptor out of map {:leave (fn [response] response)? :enter (fn [request] request)?}. Interceptors should be passed to lambda as a mixin.
Usage:
(definterceptor ExampleInterceptor
{:leave (fn [response] (hr/origin response "*"))
:enter (fn [request] (println "I will log a request" request) request)})
Defines an interceptor out of map {:leave (fn [response] response)? :enter (fn [request] request)?}. Interceptors should be passed to lambda as a mixin. Usage: ``` (definterceptor ExampleInterceptor {:leave (fn [response] (hr/origin response "*")) :enter (fn [request] (println "I will log a request" request) request)}) ```
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close