fetch 3.0.0
-
The
whatwg-fetch
package is now a module with exports. The following methods/classes are available:fetch
Headers
Request
Response
DOMException
All exports except for
DOMException
represent the polyfill implementations, not the native variants if they are available.This library still automatically acts like a polyfill if native
window.fetch
is unavailable; there is currently no way to use it as a ponyfill. -
Change
credentials
default valueomit
→same-origin
to match the updated spec. -
fetch()
andnew Request()
now accept thesignal
parameter to accept an AbortSignal. -
Join multiple header values with
,<space>
instead of,
to match other browsers. -
Convert any Request/Response unsupported body type to a string to match the spec.
-
Flow type definitions are now included in the package.