This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-14
Channels
- # aleph (10)
- # announcements (2)
- # beginners (228)
- # calva (18)
- # cider (6)
- # clara (5)
- # cljdoc (25)
- # cljs-dev (22)
- # clojure (78)
- # clojure-dev (30)
- # clojure-europe (2)
- # clojure-finland (1)
- # clojure-italy (32)
- # clojure-nl (21)
- # clojure-uk (126)
- # clojurescript (34)
- # cursive (5)
- # data-science (2)
- # datascript (2)
- # datomic (26)
- # defnpodcast (1)
- # emacs (5)
- # figwheel (5)
- # figwheel-main (3)
- # fulcro (14)
- # graphql (5)
- # jobs (1)
- # keechma (4)
- # nrepl (5)
- # off-topic (35)
- # onyx (3)
- # pedestal (12)
- # random (1)
- # re-frame (35)
- # reagent (8)
- # reitit (20)
- # remote-jobs (5)
- # ring-swagger (20)
- # shadow-cljs (166)
- # sql (43)
- # vim (6)
- # yada (15)
on body coercion … it seems like it would in the Clojure spirit to retain the original body but I can’t see a :original-body
key or some such
isn't that (get-in ctx [:request :body])
? but what is the original body? it's a stream, and how it's handled depends on the content-type
@raymcdermott on updating the bidi tree, we use postwalk to update each yada resource in (part of) the tree
(defn update-resources [routes f & args]
(postwalk
(fn [x]
(if (instance? Resource x)
(resource (apply f x args))
x))
routes))
f
has to return a thing that's coerceable (or how do you even spell that 🙂 ) to a resource
in our case we want the raw body string so that we can check the signature against the string rather than the coerced EDN / JSON / etc… but still want the mime type so that we know how to process it
fwiw the yada manual signals that some ambiguity exists on whether to perform coercion
I think you can set the :body in the :response to avoid coercion
I'm afk otherwise I'd check the c9de
yes, that makes sense though in this case I mean on the way in rather than on the way out