Skip to content

feat: stop sending Accept - #92

Merged
MarkRosemaker merged 1 commit into
mainfrom
feat/no-accept
Nov 26, 2026
Merged

MarkRosemaker merged 1 commit into
mainfrom
feat/no-accept

Conversation

@MarkRosemaker

Copy link
Copy Markdown
Owner

Generated clients sent every media type their operation's responses declare, including an error page's text/html. That asked for responses no caller wants. Worse, each newly recorded response type made the client stop matching the very recording that introduced it. Go's HTTP client sends no Accept by default, and the APIs these clients call answer the same without one.

What changes:

  • Operation.Accept() and its template line are removed, so generated requests no longer set Accept.
  • The README now says a header parameter named Accept stays ignored and that no Accept is sent.
  • The golden, debug, apikey and auth clients are updated by hand. Each loses only its Accept lines.

go-api-libs/api#12 makes replay ignore Accept, so a recording that has the header still matches. Merge that one before libraries pick this change up. yahoo-finance's 502 recording carries Accept and needs it.

make ready passes.


Generated by Claude Code

Clients sent every media type their operation's responses declare, an
error page's text/html too, which asked for what no caller wants and
made every new response type a mismatch with the recording that taught
it. Go's HTTP client sends no Accept, and the APIs these clients call
answer the same without one, so the generated request no longer sets it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019QCb1AfnATvpBQCH3PrX7Y
@MarkRosemaker
MarkRosemaker merged commit 3661a88 into main Nov 26, 2026
1 check passed
@MarkRosemaker
MarkRosemaker deleted the feat/no-accept branch November 26, 2026 19:31
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