CodeSampleX

サンプル

Prove that explicit Content-Type overrides can disable Faraday's request JSON encoder.

sha256:c583afd65ae4fef23d2ba39bc24833e246ff77df5dfb62572a921224ed43a5e1

PUBLISHED L3_CONTRACT_PASS MIT-0

ケース

ゴール
Prove that explicit Content-Type overrides can disable Faraday's request JSON encoder. HOW
パッケージ
faraday 2.14.3
環境
ruby
作成日
2026-08-17T02:38:02Z

よくある思い込み

If request middleware includes :json, Faraday always JSON-serializes Hash bodies, even when a different Content-Type header is supplied.

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

コントラクト

ファイル

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

オリジンシーダー

csx-seed

検証レシート