Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: also consider Accept header in addition to Content-Type #138

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

macyabbey
Copy link
Contributor

@macyabbey macyabbey commented Oct 19, 2024

Noticed that the Accept header was not considered when wiretap was selecting from possible mock responses, while the Content-Type header was.

This change makes wiretap consider the client's Accept header (as a very basic form of mocking content negotation) when deciding what if any example should be used for a mock response.

@macyabbey
Copy link
Contributor Author

@daveshanley for your consideration

Copy link
Member

@daveshanley daveshanley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you for your contribution.

@macyabbey
Copy link
Contributor Author

@daveshanley Nice! Let me know if I can do anything else to help. FYI I don't have permissions to merge.

image

@daveshanley
Copy link
Member

@daveshanley Nice! Let me know if I can do anything else to help. FYI I don't have permissions to merge.

Will merge today, thanks!

@daveshanley daveshanley merged commit 1f83821 into pb33f:main Nov 1, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants