This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-21
Channels
- # admin-announcements (3)
- # beginners (15)
- # boot (96)
- # cider (5)
- # cljsjs (2)
- # cljsrn (3)
- # clojure (22)
- # clojure-austin (2)
- # clojure-russia (16)
- # clojured (2)
- # clojurescript (65)
- # css (4)
- # cursive (89)
- # datomic (7)
- # emacs (89)
- # events (1)
- # hoplon (126)
- # leiningen (2)
- # off-topic (2)
- # om (268)
- # onyx (19)
- # parinfer (42)
- # re-frame (5)
- # reagent (30)
- # yada (8)
No, that's the wrong path. It's quite rare that you ever need to change the interceptor chain, it should only be changed in exceptional circumstances
In your case I would do something like this:
I've added a GET method just so you can see and test it
The key thing to understand here is that you can access the :response
entry of the context and return a modification of it.
This is documented here: https://github.com/juxt/yada/blob/master/manuscript/090_responses.md
The method 'proxies' in yada.methods
do try to cover most cases (status codes) based on what you return. However, they can't always deduce everything so you are always allowed to return a response yourself (this is the escape hatch)
@iwillig: hope this helps
@malcolmsparks: it does thanks.