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

send_request should not update _default_headers #439

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tanoda
Copy link

@tanoda tanoda commented Mar 18, 2025

HTTPClient.send_request updates its _default_headers with headers from its parameter.
I don't believe this is the thing that you want.

@tanoda
Copy link
Author

tanoda commented Mar 18, 2025

In addition, _default_headers shares its dict instance with the RequestExecutor.

self._default_headers = http_config["headers"]

'headers': self._default_headers,

So RequestExecutor.create_request also adds the latest headers.

headers = {**self._default_headers, **headers}

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.

1 participant