Skip to content

Apply custom headers passed to client constructor #268

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

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

mattt
Copy link
Contributor

@mattt mattt commented Mar 19, 2024

Client.__init__ takes a **kwargs argument that gets passed to the underlying httpx client constructor. However, the current implementation doesn't honor any custom headers that are passed. This PR fixes that.

@mattt mattt merged commit 070d167 into main Mar 19, 2024
@mattt mattt deleted the mattt/merge-custom-headers branch March 19, 2024 11:03
mattt added a commit that referenced this pull request Jun 28, 2024
In #268, we allowed custom headers to be passed to client instances.
However, that didn't apply any custom `User-Agent` header. This is now
fixed.

This PR also updates the README to document how to create a custom
client instance, incorporating this new behavior. This PR is an
alternative to #304.

---------

Signed-off-by: Mattt Zmuda <[email protected]>
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