window.fetch polyfill is a JavaScript polyfill that provides the standard window.fetch API and related interfaces in older web browsers. Importing the package patches the browser environment only when native support is missing or incomplete. It supports common workflows for retrieving HTML or JSON, inspecting response metadata, posting forms or JSON, and uploading files through FormData. Requests return Promises and follow the behavior defined by the Fetch specification, including its handling of HTTP error statuses. Abortable requests are supported when compatible AbortController and AbortSignal implementations are available. The package is designed for browsers rather than Node.js and has little effect in modern browsers with native fetch support.
Features
- Legacy browser fetch support
- Promise-based network requests
- HTML and JSON response handling
- Form and JSON submissions
- FormData file uploads
- Abortable request compatibility