(yada.resource/prepend-interceptor
resource
my-interceptor-a
my-interceptor-b)
The interceptor chain, established on the creation of a resource. A resource’s interceptor chain can be modified from the defaults.
(coming soon)
(coming soon)
(coming soon)
(coming soon)
(coming soon)
(coming soon)
(coming soon)
(coming soon)
(coming soon)
(coming soon)
(coming soon)
(coming soon)
(coming soon)
(coming soon)
(coming soon)
(coming soon)
(coming soon)
(coming soon)
(coming soon)
(coming soon)
(coming soon)
(coming soon)
Say you want to modify the interceptor chain for a given resource.
You might want to put your interceptor(s) at the front.
(yada.resource/prepend-interceptor
resource
my-interceptor-a
my-interceptor-b)
Alternatively, you might want to replace some existing core interceptors:
(update resource
:interceptor-chain
(partial replace {yada.interceptors/logging my-logging
yada.security/authorize my-authorize}))
Or you may want to insert some of your own before a given interceptor:
(yada.resource/insert-interceptor
resource yada.security/authorize my-pre-authorize)
You can also append interceptors after a given interceptor:
(yada.resource/append-interceptor
resource yada.security/authorize my-post-authorize)
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
⌘+k | Jump to recent docs |
← | Move to previous article |
→ | Move to next article |
⌘+/ | Jump to the search field |