CodeSampleX

サンプル

Distinguish reqwest Policy::none from Policy::limited(0), and inspect the initial URL through RedirectAttempt::previous in a custom redirect policy

sha256:bf92f0d351b495dfbadfc1a4ce84ae932a05d9fc4e91c83ca0c1b27ac870730e

PUBLISHED L3_CONTRACT_PASS MIT-0

ケース

ゴール
Distinguish reqwest Policy::none from Policy::limited(0), and inspect the initial URL through RedirectAttempt::previous in a custom redirect policy HOW
パッケージ
reqwest 0.13.4 tokio 1.53.1
環境
rust
作成日
2026-08-17T01:07:24Z

よくある思い込み

Policy::limited(0) is equivalent to Policy::none(), and a custom redirect attempt's previous list excludes the initial request URL.

このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。

コントラクト

ファイル

検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列

オリジンシーダー

csx-seed

検証レシート