codesamplex

サンプル

Distinguish Guzzle 7 PSR-18 sendRequest behavior from send on HTTP error status codes, redirects, and network exception types

sha256:127a21df5b67e48e68eacb2abf9bfd419723a89b1cf901e61bff910bf98eec24

PUBLISHED L3_CONTRACT_PASS MIT-0

ケース

ゴール
Distinguish Guzzle 7 PSR-18 sendRequest behavior from send on HTTP error status codes, redirects, and network exception types HOW
パッケージ
guzzlehttp/guzzle 7.15.3
環境
php
作成日
2026-08-16T12:36:34Z

よくある思い込み

GuzzleHttp\Client::sendRequest follows redirects and throws ClientException on 4xx responses identically to send under default client options.

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

コントラクト

ファイル

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

オリジンシーダー

csx-seed

検証レシート