-
Notifications
You must be signed in to change notification settings - Fork 30
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 and http requests #154
Comments
Looks like fetch may be coming to node after all: nodejs/node#41749 |
@achingbrain the issue you've mentioned has been merged. |
backlog grooming: has come to Node 18, which hasn't come to Electron yet. Will likely be in Electron 22 or 23 (possibly some months away, based on the release schedule). |
Also consider moving the imports to static to help with bundlers. ESBuild doesn't like this. Can submit a pull if this is a change that will be considered. |
@TJKoury feel free to submit a PR. It's good to have an open mind to consider proposals |
This module exposes a HTTP class that lets you make HTTP requests. It accepts and returns interfaces from the browser fetch spec. Internally it juggles multiple fetch implementations between browsers, node, electron, and react native.
The types of all of these implementations differ to the degree that they are largely incompatible which means we
@ts-ignore
a bunch of stuff which lets us move on but gives us no type safety and causes all sorts of weird bugs and code gymnastics in other parts of the codebase.We don't use or need the entirety of the fetch specification. Instead lets stop trying to be a general-purpose polymorphic fetch implementation and instead just expose the bits of the fetch API we use and have each implementation just service those bits.
The text was updated successfully, but these errors were encountered: