Missing `wrap_stream` method in wasm
irevoire opened this issue · 1 comments
Hello,
I was trying to make an API work both on x64 and wasm, reqwest seemed like the best library; it states:
The Client implementation automatically switches to the WASM one when the target_arch is wasm32, the usage is basically the same as the async api. Some of the features are disabled in wasm : tls, cookie, blocking.
But unfortunately, this sentence is false; when using the stream
features, the wrap_stream
method is not available.
Is this something forgotten during the implementation? Or is the documentation wrong and this feature can’t be implemented?
Not affiliated with reqwest in any way, but I came across this gap in the API last week as well. I took a swing at implementing it myself and it wasn't too hard but the support for streaming request bodies in browsers seems to be a mixed bag. I was able to get it working in chrome without issue but firefox seems to call toString
on the request body when you pass it a stream. https://bugzilla.mozilla.org/show_bug.cgi?id=1387483
It's unclear to me whether this feature is implemented in safari or other browsers.
Despite this, if the reqwest team wants me to submit a PR for this I will.