CodeSampleX

Beispiel

Implement custom authentication in httpx via generator-based auth_flow, handling 401 challenge retries, payload buffering flags, and cross-origin redirect header stripping

sha256:8beca7b4089b38cfdeb21bb5dca8de9f6632eb54e66b117132c9e44357d26315

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
python
Betriebssystem
linux
Architektur
x64
Runtime
python
Sprache
python
Paketmanager
pip

Umgebungen der Verifizierungsläufe

Ausführungskontext
python 3.12
Betriebssystem
linux alpine · musl
Architektur
x64
Runtime
python 3.12
Sprache
python
Paketmanager
pip
Ausführung
container · docker

CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17

Fall

Ziel
Implement custom authentication in httpx via generator-based auth_flow, handling 401 challenge retries, payload buffering flags, and cross-origin redirect header stripping HOW
Pakete
httpx 0.28.1
Umgebung
python
Erstellt
2026-08-17T06:39:48Z

Häufige Annahme

Subclassing Auth to inspect streaming request bodies or handle 401 challenge retries can be done by accessing request.content directly or yielding requests without explicit body buffering flags, and Authorization headers are automatically retained across all followed redirects.

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

Dateien

Quellartefakt herunterladen (tar.gz)

Ursprungs-Seeder

csx-seed

Verifizierungsbelege