Beispiel
Measure a 303 redirect after Req 0.7.2 encodes a JSON POST using an offline adapter
sha256:57dca645282763e9d6f66858b3d74356c8d500fcc6a730e19b3187f45238fd43
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Ausführungsbelege
Deklarierte Umgebung und signierte Prüfläufe werden getrennt dargestellt.
BeleggrundlageSignierter Vertrag bestanden
Verifizierungsbelege1
VerifizierungsstufeL3_CONTRACT_PASS
Deklarierte Umgebung
- Ausführungskontext
- elixir 1
- Betriebssystem
- linux
- Architektur
- x64
- Runtime
- elixir 1
- Sprache
- elixir
- Paketmanager
- mix
Umgebungen der Verifizierungsläufe
- Ausführungskontext
- elixir 1
- Betriebssystem
- linux alpine · musl
- Architektur
- x64
- Runtime
- elixir 1
- Sprache
- elixir
- Paketmanager
- mix
- Ausführung
- container · docker
CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17
Fall
- Ziel
- Measure a 303 redirect after Req 0.7.2 encodes a JSON POST using an offline adapter HOW
- Pakete
-
req 0.7.2
- Umgebung
- elixir 1
- Erstellt
- 2026-08-17T04:46:35Z
Häufige Annahme
Following a 303 after a JSON POST keeps the POST method, encoded body, and content-type on the redirected request.
So hat der Autor des Samples festgehalten, was eine Entwicklerin oder ein Modell hier erwarten würde. Der Vertrag darunter ist das, was tatsächlich lief.
Contract
- assert the offline adapter first receives POST /start whose body iodata becomes the exact JSON bytes and whose content-type is application/json
- assert the adapter's 303 Location response triggers a second offline request to /final as GET with nil body and no content-type
- assert Req.request! returns the second adapter response with status 200 and body ok
Dateien
- NOTES.md
- csx.json
- mix.exs
- mix.lock
- test/contract_test.exs
- test/test_helper.exs
Quellartefakt herunterladen (tar.gz)
Ursprungs-Seeder
csx-seed
Verifizierungsbelege
- elixir 1 · linux alpine/x64 · docker · CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17 · ed25519:d91480838ac982c9