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

Fetch API #59

Open
joaodasilva opened this issue Jan 16, 2022 · 0 comments
Open

Fetch API #59

joaodasilva opened this issue Jan 16, 2022 · 0 comments
Labels

Comments

@joaodasilva
Copy link
Contributor

Window.js should implement the fetch API:

https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API

This enables programs to make HTTP and HTTPS requests.

Window.js should support a WebSockets client as well.

A separate issue is to support networking and TCP/UDP sockets in general, also for server sockets.

Window.js already includes libuv but it's scoped to supporting subprocesses, and there's a uv_loop_t per subprocess. The first part of this work would be to refactor that and have a single uv_loop_t to be used for all file, networking and IPC for the current process. It should be completely reset on reloads.

Another initial decision to make is which library to use to have an HTTP client, as libuv only gives sockets support. Some candidates to look into would be libcurl and libwebsockets, and maybe cronet.

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

No branches or pull requests

1 participant