-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
web-sys: Unable to add body to a Request #817
Comments
dictionary RequestInit {
// ...
BodyInit? body;
// ...
}; and typedef (Blob or BufferSource or FormData or URLSearchParams or USVString) BodyInit; I wonder if we support that kind of union yet... time to dig into the logs. |
No, it is not yet supported. Only non-nullable unions with only interfaces in them are supported in dictionaries. |
@afdw can you point me to where we identify and skip these members right now? I think we need better logging |
wasm-bindgen/crates/webidl/src/idl_type.rs Lines 508 to 528 in 4e86ecd
|
Thanks! |
I think it is OK to fall back to |
Bind them all as `JsValue` as that's the "least common ancestor" we can work with. Fixes up one location in WebIDL where `Option<JsValue>` arose as we haven't implemented that. Closes rustwasm#817
Bind them all as `JsValue` as that's the "least common ancestor" we can work with. Fixes up one location in WebIDL where `Option<JsValue>` arose as we haven't implemented that. Closes rustwasm#817
I'm trying to create a
Request
with a body but I can't figure out how (or it isn't possible yet). NeitherRequest
norRequestInit
offer a way to add a body. Ultimately I'd like to do something like this.The text was updated successfully, but these errors were encountered: