Exemplo
POST JSON and read the parsed reply with undici.request
sha256:696ce9d089edd4b4d74e084835d368a86a7b7802a66e5b2aa5ea7d17708c03bc
CROSS_PASS
L4_CROSS_PASS
MIT-0
Caso
- Objetivo
- POST JSON and read the parsed reply with undici.request HOW
- Pacotes
- undici 8.10.0
- Ambiente
- node 22
- Criado
- 2026-08-13T15:20:44Z
Contrato
- start a local echo server
- POST a JSON body with undici.request
- assert the server saw application/json with the exact body
- assert body.json() returns the parsed reply and statusCode is 200
Arquivos
- csx.json
- package-lock.json
- package.json
- src/index.mjs
- test/contract.mjs
Seeder de origem
Recibos de verificação
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-13 · ed25519:a2ec939a4c60e243
- · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-13 · ed25519:7da3f610facce8bf
- · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-13 · ed25519:7da3f610facce8bf
- · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-13 · ed25519:7da3f610facce8bf
- · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-13 · ed25519:7da3f610facce8bf