This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-07
Channels
- # aleph (19)
- # aws (1)
- # beginners (75)
- # boot (28)
- # cider (1)
- # cljs-dev (12)
- # cljsrn (20)
- # clojure (350)
- # clojure-argentina (1)
- # clojure-chicago (2)
- # clojure-dev (2)
- # clojure-russia (5)
- # clojure-spec (2)
- # clojure-uk (14)
- # clojure-ukraine (3)
- # clojurescript (68)
- # component (87)
- # core-async (25)
- # core-logic (13)
- # cursive (4)
- # data-science (72)
- # datascript (59)
- # datomic (15)
- # defnpodcast (7)
- # emacs (33)
- # hoplon (5)
- # immutant (73)
- # jobs (21)
- # klipse (6)
- # lumo (14)
- # off-topic (26)
- # om (23)
- # onyx (6)
- # parinfer (37)
- # protorepl (4)
- # re-frame (13)
- # ring (2)
- # rum (3)
- # spacemacs (2)
- # specter (22)
- # sql (47)
- # uncomplicate (10)
- # unrepl (79)
- # untangled (66)
- # vim (47)
- # yada (17)
@malcolmsparks I was thinking that being able to specify an interceptor chain in yada/listener
could be good
Not sure about the exact location/implementation, but having to walk the routes to e.g. add authentication on every resource gets a bit messy, especially if you've got lots of things to customise like CSP, or want to modify interceptor chain. But maybe that is the best way to do it
https://github.com/juxt/yada/blob/master/doc/interceptors.adoc
is that documentation still accurate ? the interceptor helper functions have moved to yada.handler
a long time ago, not ?
Yes. Recently we made the decision to keep interceptors defined in the resource rather than handler.
The docs need some work. I will merge the PR
Is it possible to turn off automatic serialisation/deserialisation? We have to integrate with an tool that produces broken json (record per line), and need to work around it manually
Alternatively, if I can just use a ring handler with my yada server/bidi routes as is, that'd be nice
Maybe the right way is to replace whatever interceptor does the deserialisation
@lucasbradstreet just for a single resource, or globally? There's a multi-method that handles json deserialization
@dominicm for a single resource
@lucasbradstreet probably gotta remove the interceptor, yeah. Nothing built in to yada. But that does surprise me.
https://github.com/juxt/yada/blob/fd57b9e3feaae0eda3001e1b85a8e3aa5ff14f5a/src/yada/interceptors.clj#L175-L182 this looks promising
Awesome, that appears to be working!
Thanks
Hmm maybe not. Will figure it out.