-
Notifications
You must be signed in to change notification settings - Fork 557
begin migration to native fetch() #2333
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
Conversation
That's pretty cool already! I don't think |
My guess is that we'd need a different code generator (or at least new capabilities in the existing one) since there are enough small, subtle differences between node-fetch and native fetch. |
Looks good to me, my only question is for the |
As far as I can tell, yes. The joys of depending on things from npm. nock started depending on
|
You can also check out this dependabot PR from last night that tried to make the same update - #2337. |
/lgtm Thanks. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brendandburns, cjihrig The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Refs: #2306
A few notes:
Readable.fromWeb()
), but ideally we would try working with web streams directly to reduce some overhead.node-fetch
is still used insrc/gen/http/isomorphic-fetch.ts
, which I think would need to be resolved in the code generator.src/util.ts
, there is anormalizeResponseHeaders()
that apparently exists due to a node-fetch quirk. I did not look into whether or not that is still needed, but keeping it doesn't seem to break anything.FetchError
does not appear to be a thing in native fetch.We may or may not want to keep this as a draft PR because of this list
and pending the CI- what do others think?