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