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 Polish #26

Open
3 of 6 tasks
yoshuawuyts opened this issue Aug 6, 2019 · 4 comments
Open
3 of 6 tasks

WASM Polish #26

yoshuawuyts opened this issue Aug 6, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@yoshuawuyts
Copy link
Member

yoshuawuyts commented Aug 6, 2019

#25 introduces a minimal WASM backend for Surf. In order to make it production ready, we should:

  • support different methods on request
  • support body uploads
  • remove all unwraps
  • set headers on request
  • get headers from response
  • create an internal fetch client abstraction to get ready to move the bulk of the code to gloo

Thanks!

@yoshuawuyts yoshuawuyts added the enhancement New feature or request label Aug 6, 2019
@yoshuawuyts yoshuawuyts mentioned this issue Aug 7, 2019
@liamcurry
Copy link

It would also be nice to have the ability to abort/drop requests in WASM environments. I'm not sure if this is possible with Hyper but I can think of a number of cases where aborting requests would be useful in a browser.

@yoshuawuyts
Copy link
Member Author

@liamcurry for sure; we could do this as a Drop impl on runtime-wasm using the fetch observer API. We'd need to do some runtime feature detection though because it's not universally available in browsers, but it would def be cool to have!

@liamcurry
Copy link

@yoshuawuyts Would it make sense to use XHR instead since that is available in all browsers? From what I can tell the only difference between the two is that fetch uses promises, which would be irrelevant here. Asynchronous XHR requests seem to be allowed in Service Workers too.

@yoshuawuyts
Copy link
Member Author

@liamcurry my understanding is that spec authors consider XHR to be deprecated in all but name, so I feel it might make most sense for us to keep building on fetch — even if not all features are equally available everywhere.

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

No branches or pull requests

2 participants