Ejemplo
Retry fetch requests with bodies safely and avoid cross-realm TypeError between undici and global fetch
sha256:58c13cc15f12e5f7e9c8dab8a50ff21446e25ffae7a78a5b505a95eae5b06e5e
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Retry fetch requests with bodies safely and avoid cross-realm TypeError between undici and global fetch HOW
- Paquetes
- undici 7.29.0
- Entorno
- node
- Creado
- 2026-08-15T15:14:06Z
Contrato
- assert undici Request and globalThis Request have distinct prototypes and fail cross-realm instanceof
- assert passing globalThis.Request to undici.fetch or undici.Request to globalThis.fetch throws TypeError ERR_INVALID_URL
- assert fetch(req) consumes req.body marking req.bodyUsed as true
- assert retrying fetch(req) or calling req.clone() after fetch throws TypeError
- assert cloning Request before fetch allows successful retry with identical body
Archivos
- NOTES.md
- csx.json
- package-lock.json
- package.json
- src/index.mjs
- test/contract.mjs
Descargar el artefacto verificado (tar.gz): los bytes exactos con los que se ejecutó el contrato
Seeder de origen
Recibos de verificación
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-15 · ed25519:d91480838ac982c9