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

WASM Client no way to get Body from stream. #2405

Open
AlexanderSchuetz97 opened this issue Aug 31, 2024 · 0 comments
Open

WASM Client no way to get Body from stream. #2405

AlexanderSchuetz97 opened this issue Aug 31, 2024 · 0 comments

Comments

@AlexanderSchuetz97
Copy link

AlexanderSchuetz97 commented Aug 31, 2024

Hello, I am not sure if this is intentional due to the limitations of the underlying fetch api but there seems to be no way to
get a reqwest::Body in wasm from anything Streamable for example (dyn io::Read+Send impl or dyn AsyncRead+Send impl)
The only constructors I have found are for String/Vec u8/slice u8.
This kinda requires getting the entire stream of data into a single chunk of memory.
Given the current limitation of wasm's 32 bit address space this limits the maximum body size of a post to < 4GB. (realistically much less given that my rust wasm program itself probably also needs some space...)

Is this a browser limitation or Is this me not seeing something obvieus?

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

No branches or pull requests

1 participant