This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-08
Channels
- # aws (9)
- # beginners (69)
- # boot (14)
- # cider (26)
- # cljs-dev (56)
- # cljsrn (9)
- # clojars (4)
- # clojure (229)
- # clojure-brasil (1)
- # clojure-france (11)
- # clojure-greece (2)
- # clojure-italy (4)
- # clojure-mke (6)
- # clojure-serbia (6)
- # clojure-spec (83)
- # clojure-uk (38)
- # clojurescript (171)
- # core-async (3)
- # cursive (11)
- # data-science (11)
- # datomic (27)
- # emacs (113)
- # funcool (6)
- # hoplon (4)
- # jobs (1)
- # luminus (13)
- # lumo (44)
- # off-topic (148)
- # onyx (5)
- # overtone (1)
- # pedestal (4)
- # powderkeg (1)
- # proton (2)
- # re-frame (150)
- # reagent (16)
- # ring-swagger (43)
- # spacemacs (4)
- # specter (36)
- # vim (4)
- # yada (10)
Does anyone have an example of coercing an upload to a file? I tried putting :post {:parameters {:body java.io.File}}
, but got a 400 back. A second probably related question, why would (:body ctx)
have the body of my file, but (:request (:body ctx))
have an empty stream?
It looks like https://github.com/juxt/yada/blob/1.2.2/src/yada/request_body.clj#L42-L56 isn't fully implemented yet. It looks like it just counts the number of buffers in the body-stream? Is that correct or am I misreading it?
How do I get a cookie from within a resource method? (get-in ctx [:cookies])
works for the verify multimethods but returning nil on ctx in a resource method.
I think you can specify :cookie in :parameters https://juxt.pro/yada/manual/index.html#parameters
danielcompton: Also having issues getting this to work. All I can glean from the yada source is that (s/optional-key :cookie) s/Any
is an accepted resource parameter but not where it is coerced or the correct format for a resource entry, as :parameters {:cookie {(schema/required-key "session") String}}
doesn't seem to pull in the cookie or require anything as a parameter.
hmm, not sure, I've never used it I just saw it going through the code base. Maybe see if there's any tests for it?
like a form param