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

Incorporating standalone HTTP crates #226

Closed
David-OConnor opened this issue Sep 23, 2019 · 4 comments
Closed

Incorporating standalone HTTP crates #226

David-OConnor opened this issue Sep 23, 2019 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@David-OConnor
Copy link
Member

Until recently, using web_sys's fetch functionality's been the only practical way to perform HTTP requests. Recently, two new options became available:

Surf is a just-release async HTTP crate with WASM support.
Reqwest, a popular Rust HTTP crate recently added WASM support.

Thoughts on using one of these along with, or instead of the existing fetch module? I haven't explored this yet, and how it would work with the update system. Users can always, of course, use these separately with no direct integration.

@MartinKavik
Copy link
Member

On the first look:

So I suggest to wait until we can use async/.await and Reqwest fully supports WASM. Then we can experiment with them or/and rewrite our Fetch module.
However it's a pain to support our custom API wrappers, we should use external libraries as much as possible if it makes Seed's code simpler and there aren't problems with public API. In other words - outsource work on common components and focus on Seed.

@David-OConnor
Copy link
Member Author

David-OConnor commented Sep 25, 2019

Agree - unable to get either to compile to wasm target on stable. Will re-attack later.

@MartinKavik
Copy link
Member

Reqwest, Surf and probably other libraries depends on rust-url, which can be problem - see servo/rust-url#557 (comment).

So we probably have to create alternative to rust-url which would have the same public API like rust-url but use browser's URL. It would help also with Seed's core - see PR #253.

@flosse
Copy link
Member

flosse commented Mar 7, 2023

obsolete since v0.10.0

@flosse flosse closed this as completed Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants