This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-10
Channels
- # aws (3)
- # beginners (186)
- # boot (25)
- # cider (2)
- # cljsrn (57)
- # clojure (161)
- # clojure-boston (1)
- # clojure-dusseldorf (11)
- # clojure-italy (5)
- # clojure-russia (20)
- # clojure-serbia (1)
- # clojure-spec (10)
- # clojure-uk (16)
- # clojurescript (207)
- # community-development (86)
- # core-async (2)
- # cursive (40)
- # datascript (1)
- # datomic (2)
- # editors (5)
- # emacs (8)
- # funcool (1)
- # gsoc (2)
- # hoplon (2)
- # jobs (5)
- # leiningen (3)
- # liberator (18)
- # luminus (18)
- # off-topic (106)
- # om (2)
- # onyx (5)
- # pedestal (7)
- # powderkeg (7)
- # re-frame (7)
- # remote-jobs (1)
- # ring-swagger (4)
- # rum (5)
- # slack-help (1)
- # untangled (11)
- # yada (48)
what happens if you get rid of the vhosts model entirely and just pass the routes (for testing)
to make sure that everything else is configured correctly?
is there an easy way to get the body of a request?
it’s a manifold.stream.BufferedStream
ClassCastException manifold.stream.BufferedStream cannot be cast to java.util.concurrent.Future clojure.core/deref-future (core.clj:2206)
nope, can’t deref
so interop? yuck!
it’s probably empty
didn’t send a body — just testing
so maybe it’s a corner case
thanks!
I think I’ll switch to ring 🙂
yada seems like a bit of an overkill for my use case
and there’s no “gentle introduction” documentation
honestly: it's rare you should need to consume the request body directly @stathissideris
maybe I don’t need to consume the body, there’s probably a better way that I don’t know about
just processing some JSON that’s coming in the body of the request
If you have :accepts "application/json"
in your resource, you will get the json body parsed & given to you as a map.
if only it was mentioned in the manual! 😄
it’s simpler in the sense that it’s more automatic, but harder in the sense that it’s less discoverable
I mean as a string
slurp
doesn’t work, it looks the body is something from manifold
@stathissideris @dominicm https://github.com/ztellman/byte-streams is always your answer
Built in to yada
So it's in your project already
@malcolmsparks even on a manifold stream? :thinking_face:
byte-streams
@stathissideris @dominicm I had this lying around somewhere, it could serve as an example https://gist.github.com/jeroenvandijk/bf5018238dd1aaa69f696c320673910e