How jakechampion/fetch works
This is a browser-only window.fetch polyfill, implementing a Promise-based subset of Fetch on top of XMLHttpRequest. The principal workflow is an application calling the polyfill and receiving a Response; the README documents request bodies, response parsing and metadata, credentials, and abort usage. The sampled source also shows request/response types, header handling, body-reading helpers, and XMLHttpRequest event handling. Several implementation connections are omitted from the excerpts, so the graph avoids guessing their call sequence.
Main entry points: fetch.js XHR transport
Components 8
Fetch API
- Fetch polyfill
fetch.js
Request And Response
- Request options
fetch.js - Headers
fetch.js - Response
fetch.js - Body readers
fetch.js
Browser Transport
- XHR transport
fetch.js
Other components
- Web application
- Browser XMLHttpRequest
Connections 3
- Web application → Fetch polyfill: calls
README.md - XHR transport → Browser XMLHttpRequest: uses
fetch.js - XHR transport → Response: constructs
fetch.js