seed
seed copied to clipboard
Please add an example down/up loading cbor/bson and other binary formats (with serde)
I'm having trouble groking how to get data out of the fetch::Request::fetch() method.
Sorry this is more of a support request than an issue.
Try to get "raw" response:
- Current Fetch API: https://github.com/seed-rs/seed/blob/5e61a6e3d877e5bc94bc9a6df85f54c8f6e3ce26/src/browser/service/fetch.rs#L67
- New (WIP, but simpler) API - https://github.com/seed-rs/seed/pull/353 + https://github.com/TatriX/seed/blob/d54567c98d0a4f4f85dd98c32896661d7f888df2/src/browser/fetch/response.rs#L59
And then try to get blob or byte array from the body:
- https://developer.mozilla.org/en-US/docs/Web/API/Body
- https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Response.html#method.array_buffer
If you want to help with the example, please create or find a backend API that accepts and returns cbor/bson/x (ideally echo API). Or we can add it to server_integration example if Actix can do that.
obsolete since v0.10.0