Skip to content

doc: document fetch() differences from the Fetch Standard#62236

Open
kovan wants to merge 1 commit intonodejs:mainfrom
kovan:doc/fetch-differences
Open

doc: document fetch() differences from the Fetch Standard#62236
kovan wants to merge 1 commit intonodejs:mainfrom
kovan:doc/fetch-differences

Conversation

@kovan
Copy link
Contributor

@kovan kovan commented Mar 13, 2026

Summary

Add a "Differences from the standard" section to the fetch documentation
in globals.md, covering:

  • No CORS enforcement (server-side, no origin)
  • No forbidden headers restriction
  • Response accepts async iterables (Node.js extension)
  • Response bodies must be consumed to avoid connection leaks
  • Content-Encoding layer limit of 5
  • Manual redirect returns actual response, not opaqueredirect

Based on the differences documented in undici's README
and the original issue description from @mcollina.

Fixes #52163

Add a 'Differences from the standard' section to the fetch
documentation listing the ways Node.js fetch (via undici) differs
from browser implementations: no CORS enforcement, no forbidden
headers, async iterable support in Response, response body
consumption requirements, Content-Encoding layer limits, and
manual redirect behavior.

Fixes nodejs#52163
@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document differences between Node.js fetch() implementations and the standard

2 participants