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
multipart for wasm32 #966
multipart for wasm32 #966
Conversation
Most of the code is based on the async implementation. I believe that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks great. What in particular do you think needs more work?
@@ -180,6 +190,14 @@ impl RequestBuilder { | |||
self | |||
} | |||
|
|||
/// TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can probably be just a simple sentence, since the main docs use the non-wasm version.
For me there's the issue that async_impl and wasm have lots of dublicated logic, only the serialisation to Also, it is largely untested as the project I'd like to use this for is currently in the process of being ported to wasm. Another issue is, that async_impl supports stacking multipart messages in eachother, my wasm implementation will fail during runtime when the user does this. All in all only style questions and edge cases that I currently don't like. And as I said - basicly untested code. |
I hear you on the duplicated logic. It would be a good PR to try to consolidate as much as possible into some Also, if you know how we can setup unit testing for WASM, I'd be thrilled. I don't know too much about WASM testing, myself. See #657 |
df4abdb
to
eb6603e
Compare
The async_impl doesn't do this either, so let's try to stay API compatible.
Well, actually I'm as new to wasm as you are, but I know that you can use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems good to me, if you want to learn how to test Rust WASM and deal with #657, that could be a cool next step. If not, no problem, thanks for this PR!
Yay! Have fun! |
This PR introduces
Request::bearer_auth
forwasm32
and multipart data based onFormData
I marked this as WIP as it is currently at proof of concept stage.
solves #965.