Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client async is not very async #349

Closed
nicferrier opened this issue Sep 14, 2017 · 1 comment
Closed

client async is not very async #349

nicferrier opened this issue Sep 14, 2017 · 1 comment

Comments

@nicferrier
Copy link

I am trying to implement a proxy with http-kit but it seems the client is not very async, only the connection?

I'm doing something like this:

(http-client/get
                 url
                 {:as :stream}
                 (fn [{:keys [status headers body error]}]
                   #_(pp/pprint
                      {:request url
                       :response [status headers body error]})
                   (a/>!! ch [status headers body error])))

but the body is returned as an inputstream but an input stream that has been fully read.

What I want is to read it as I go, sending the necessary chunks.

Is there a way to do that?

This is [http-kit "2.1.19"] and Leiningen 2.6.1 on Java 1.8.0_25

@ptaoussanis
Copy link
Member

Closing as part of issue triage due to inactivity.
Please feel free to re-open if this issue is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants