Liking cljdoc? Tell your friends :D
All platforms.

fierycod.holy-lambda.interceptor

This is very naive implementation of interceptors and it's a subject to change. Consider this namespace as an alfa.

This is very naive implementation of interceptors and it's a subject to change. Consider this namespace as an alfa.
raw docstring

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