On 27 September 2014 10:01, mond <[email protected]> wrote:
>
> Speaking to the main point, no I don't want to put a channel on to the
> response so that's a mistake that I see and would like to avoid. I would
> like to understand where I have gone wrong.
>
You're trying to use core.async with a library that has no understanding of
core.async. It's important to understand that core.async isn't magic; it
won't work with libraries that weren't designed for it.
> Maybe I need to use HTTPkit instead?
>
HTTP Kit has good support for async, but uses its own lightweight protocol.
Check out the examples on their website, and if you still want to connect a
core.async channel up to HTTP Kit, you'll need something like:
(async/take! async-ch (fn [msg] (httpkit/send! http-ch msg)))
This tells core.async to take values off the async channel and pass them
onto HTTP Kit.
- James
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.