We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
I've search everywhere but couldn't find a hint about how to get a binary file, i.e. an array of bytes instead of a body.
When doing it the normal way, the body's size isn't correct; it's approximatively twice as big as it should. Probably due to the encoding.
body
My code at the moment:
(let [content-in-bytes (. (:body @p) getBytes)] (. file-channel write (ByteBuffer/wrap content-in-bytes) (:start-offset promises-hash)))
Can someone suggest how I should deal with this?
Thanks!
The text was updated successfully, but these errors were encountered:
Hi, with this commit a15fde2,
It's possible to say something like this (modeled after clj-http):
(let [body (:body @(http/get "http://site.com/favicon.ico" {:as :byte-array}))] ;; body is a byte array ;; other options: :auto, :text :stream )
[http-kit "2.1.0-SNAPSHOT"]
Can you help review the API: is the :as option looks good, the :text :auto :byte-array :stream make sense?
:as
:text
:auto
:byte-array
:stream
@ptaoussanis , any ideas?
Sorry, something went wrong.
Damn, you're fast! :) As a user, the API looks fine to me.
Thank you.
No branches or pull requests
Hi,
I've search everywhere but couldn't find a hint about how to get a binary file, i.e. an array of bytes instead of a body.
When doing it the normal way, the
body
's size isn't correct; it's approximatively twice as big as it should. Probably due to the encoding.My code at the moment:
Can someone suggest how I should deal with this?
Thanks!
The text was updated successfully, but these errors were encountered: