Skip to content

Commit 98e9c54

Browse files
committed
doc: add differences from standard fetch in fetch() API
1 parent 2ea31e5 commit 98e9c54

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doc/api/globals.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,16 @@ The implementation is based upon [undici](https://undici.nodejs.org), an HTTP/1.
541541
written from scratch for Node.js. You can figure out which version of `undici` is bundled
542542
in your Node.js process reading the `process.versions.undici` property.
543543

544+
### Differences from Standard Fetch
545+
546+
Node.js provides a `fetch()` implementation that is similar to the web standard but with a few notable differences:
547+
548+
* `new Response(asyncIterable)` is supported, which is not in the standard.
549+
* Cookies are not automatically handled.
550+
* The forbidden headers list is not enforced.
551+
* Other subtle differences may exist; consult the implementation details.
552+
553+
544554
### Custom dispatcher
545555

546556
You can use a custom dispatcher to dispatch requests passing it in fetch's options object.

0 commit comments

Comments
 (0)