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

验证回执