This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-02
Channels
- # aws-lambda (5)
- # bangalore-clj (1)
- # beginners (96)
- # boot (66)
- # cider (39)
- # cljsjs (2)
- # cljsrn (5)
- # clojure (265)
- # clojure-android (1)
- # clojure-france (1)
- # clojure-greece (32)
- # clojure-italy (4)
- # clojure-russia (2)
- # clojure-sg (1)
- # clojure-spec (27)
- # clojure-uk (25)
- # clojurescript (88)
- # cursive (4)
- # datomic (31)
- # emacs (96)
- # hoplon (10)
- # immutant (14)
- # jobs (2)
- # luminus (1)
- # lumo (66)
- # off-topic (128)
- # om (8)
- # om-next (2)
- # onyx (9)
- # parinfer (5)
- # re-frame (37)
- # reagent (16)
- # rum (9)
- # schema (3)
- # specter (34)
- # unrepl (8)
- # yada (21)
hmmm, i couldn’t find this in the documentation directly — i remember “back in the day”, you would use HTTP multipart responses to get a very long-running request. is this still supported in yada, or is SSE the only way to go ?
Yes. You should be able to do long running responses.
The SSE implementation is built on top
is it just a matter of returning a manifold stream ? or is there anything else to it ?
Just the stream should do
I’m trying to get our Yada API to respond with the Schema error in case of a 400, but it seems to limited by this: https://github.com/juxt/yada/blob/5d49342bcb994309b96673fb4a531ff313647c79/src/yada/handler.clj#L57
For now, you can replace with your own error interceptor chain
It is a bit arduous but worthwhile because you're then in complete control of error handlinh
For now I used a filthy (intern 'yada.handler 'error-representations ...)
hack + overrode render-error
for “application/json”, but I’ll put a note of what you recommended in case I run into more trouble.
Manifold question: why is this not 2?
(let [d (d/chain
(d/deferred)
inc)]
(d/success! d 1)
<@U1DHX2E5V>)
Didn’t work the way I thought:
(do
(let [d1 (d/deferred)
d2 (d/chain
d1
inc)]
(d/success! d1 1)
@d2)) ;;=> 2
@borkdude take al ook at the stream operators here https://github.com/ztellman/manifold/blob/master/docs/stream.md they’re pretty nifty, and you can convert them to deferreds and back