Liking cljdoc? Tell your friends :D
All platforms.

fierycod.holy-lambda.interceptor


definterceptorclj/smacro

(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)})
```
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close