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

Default to native fetch not @web-std/fetch #55

Closed
alanshaw opened this issue Sep 9, 2022 · 0 comments
Closed

Default to native fetch not @web-std/fetch #55

alanshaw opened this issue Sep 9, 2022 · 0 comments

Comments

@alanshaw
Copy link
Member

alanshaw commented Sep 9, 2022

Node 18 has a global fetch implementation so @web-std/fetch should not be needed for much longer. Please can we be consistent with ucanto and detect and use the native fetch implementation rather than depending on this module. Library consumers can install their own fetch implementation if they want to use this in an environment that does not support native fetch.

Note: need to globalThis.fetch.bind(globalThis) to avoid TypeError: 'fetch' called on an object that does not implement interface Window. e.g. storacha/ucanto#88

alanshaw added a commit that referenced this issue Sep 12, 2022
alanshaw added a commit that referenced this issue Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants