r0man / cljs-http

A ClojureScript HTTP library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The custom channel seems doesn't work

kangbb opened this issue · comments

I hava tried it as following:

(def body (chan 1 (map :body)))
(go (while true
      (println (<! body))))
(go (http/get "https://api.github.com/users"
              {:with-credentials? false
               :query-params      {"since" 135}}
              {:channel body}))

But nothing will print.

@kangbb You're passing two maps -- it should just be one:

(go (http/get "https://api.github.com/users"
              {:with-credentials? false
               :query-params      {"since" 135}
               :channel           body}))

@kangbb You're passing two maps -- it should just be one:

(go (http/get "https://api.github.com/users"
              {:with-credentials? false
               :query-params      {"since" 135}
               :channel           body}))

Thanks a lot, it works.

@kangbb How are you consuming the responses from the custom channel? I'm running into the issue described in #66, but would like to use a custom channel.