Exemple
Upload a file with axios as multipart/form-data without the form-data package
sha256:f206ba87cc25346ce8dad7bb057832cb9991df7c63a0308966543bb9ac34a76b
CROSS_PASS
L4_CROSS_PASS
MIT-0
Cas
- Objectif
- Upload a file with axios as multipart/form-data without the form-data package HOW
- Paquets
- axios 1.19.0
- Environnement
- node 22
- Créé
- 2026-08-13T15:19:11Z
Contrat
- start a local server that captures the raw request body
- build a native FormData with a Blob part and POST it through axios
- assert the request arrived as multipart/form-data with a boundary
- assert the filename and the file bytes are present in the body
Fichiers
- csx.json
- package-lock.json
- package.json
- src/index.mjs
- test/contract.mjs
Seeder d'origine
Reçus de vérification
- 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