You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently migrated from isomorphic-unfetch to cross-fetch because following my upgrade to Node v18, which introduced a native fetch API, the isomorphic-unfetch library (v3.1.0) began dispatching server requests via the new/experimental fetch API. Unfortunately, that can be very problematic (as I discovered) because:
The Node runtime message clearly states: ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
The fetch implementation uses undici, which doesn't document certain forbidden headers - see GitHub issue here
Even if the forbidden headers were documented, certain state management libraries automatically inject (potentially forbidden) headers. That includes mine, which injects Connection and cannot be overrriden
So, this is just a suggestion to document that additional benefit of cross-fetchand request not to change that behavior
Thanks for maintaining the library and supporting open-source!
The text was updated successfully, but these errors were encountered:
@lgants thanks for taking the time to write this report. Currently, there is no plan to detect native node fetch implementation but I'll keep these issues in mind if something changes. Closing this for now.
I recently migrated from
isomorphic-unfetch
tocross-fetch
because following my upgrade to Node v18, which introduced a native fetch API, theisomorphic-unfetch
library (v3.1.0) began dispatching server requests via the new/experimental fetch API. Unfortunately, that can be very problematic (as I discovered) because:ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
undici
, which doesn't document certain forbidden headers - see GitHub issue hereConnection
and cannot be overrridenSo, this is just a suggestion to document that additional benefit of
cross-fetch
and request not to change that behaviorThanks for maintaining the library and supporting open-source!
The text was updated successfully, but these errors were encountered: