This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-10
Channels
- # beginners (97)
- # boot (77)
- # cider (7)
- # cljs-dev (47)
- # cljsrn (3)
- # clojure (125)
- # clojure-austin (5)
- # clojure-dusseldorf (1)
- # clojure-italy (4)
- # clojure-russia (91)
- # clojure-spec (80)
- # clojure-uk (54)
- # clojurescript (92)
- # core-async (6)
- # cursive (17)
- # datomic (56)
- # hoplon (7)
- # immutant (3)
- # liberator (3)
- # luminus (4)
- # off-topic (26)
- # om (41)
- # om-next (11)
- # pedestal (3)
- # perun (3)
- # protorepl (25)
- # re-frame (32)
- # reagent (33)
- # ring (46)
- # rum (3)
- # spacemacs (5)
- # specter (82)
- # test-check (16)
- # untangled (8)
- # yada (26)
For some reason I had the impression that I could just return a response on a core.async channel to Yada and it would handle it automatically. Looking at the docs though, that seems to only be the case for SSE. Should I be making it into a deferred instead?
I think so
Are there any strategies for testing requests from the REPL? I’m not quite sure how to create a context for a request and then to call it against my app
Is the :cookie scheme meant to be commented out here? https://github.com/juxt/yada/commit/831c397a1ba1afd3f9f40dcf2a2262f7db2f5342#diff-5002401191569975dd8160bf4bfc48afR25
@danielcompton perhaps response-for
is what you’re looking for ?
https://github.com/juxt/yada/blob/master/src/yada/test.clj#L23
@danielcompton The security auth stuff is still a wip, sorry, it needs more docs - I'm currently working on oauth2 for a client so I should be able to visit this soon
Yes, you should be able to pass a core.async channel from yada - but I've heard on this channel that people might have had trouble doing so - haven't got to the bottom of it.
According to the manifold docs you should be able to do this
But I haven't tested that it's still the case
I think manifold had a change. Where a channel is not a deferred, but only a stream. So I would guess yada would interpret that as SSE/Websockets instead of waiting for a response.
@dominicm yep you're dead on
@lmergen: I think so?
Thanks!
re: oauth, I am using this in my project, will clean a bit and make a PR: https://github.com/nha/yada/tree/feature/parametrize-gh-oauth-cookie-y2
Good: I couldn’t have had a look before this evening anyway, so unless you think there is something useful there, I’ll just leave it to you
right now, if this happens, spec throws an error somewhere and a 500 is returned, which is semantically incorrect
what would be a good approach to do this ? i would almost think a yada/resource should have some way to be provided a spec, which is used to validate :parameters