Repository navigation
feat: stop sending Accept - #92
Merged
Merged
Conversation
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
This was referenced Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 noAcceptby 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 setAccept.Acceptstays ignored and that noAcceptis sent.Acceptlines.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 carriesAcceptand needs it.make readypasses.Generated by Claude Code