Skip to content

feat: ignore Accept when replaying - #12

Merged
MarkRosemaker merged 1 commit into
masterfrom
feat/replay-ignores-accept
Nov 26, 2026
Merged

MarkRosemaker merged 1 commit into
masterfrom
feat/replay-ignores-accept

Conversation

@MarkRosemaker

Copy link
Copy Markdown
Contributor

Generated clients are going to stop sending Accept (see the companion openapi-codegen PR). From now on, apitest.Replay ignores Accept the same way it ignores User-Agent, whether or not a recording has it. It previously used cassette.OptionalHeaders("Accept").

This also fixes yahoo-finance's replay of its new 502 recording. That recording has Accept: application/json, but the client sends application/json, text/html.

The test now replays a recording that has Accept against a call without one, and a recording without Accept against a call that sends a different one.

make ready passes.


Generated by Claude Code

Clients stop sending Accept, so replay compares a request's headers
without it, as it does the User-Agent, whether its recording holds one
or not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019QCb1AfnATvpBQCH3PrX7Y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants