Unable to access raw body stream from fetch response
Opened this issue · 1 comments
knubie commented
In js/fetch
you can access the raw body as a stream like so:
(let [res (<p! (js/fetch endpoint #js{...}))]
(-> res .-body (.pipe dest)))
However, similar to #25, in lambdaisland/fetch it's not possible to access the raw body because it's always decoded first.
fetch/src/lambdaisland/fetch.cljs
Line 115 in 1fe9fab
plexus commented
decode-body is a multimethod, we should add a no-op :raw option, so you can make a request :as :raw
. A pr for that would be welcome.