-
-
Notifications
You must be signed in to change notification settings - Fork 59
feat: allow injection of httpx client #591
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
base: main
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 15039253673Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
postgrest/_async/client.py
Outdated
) -> AsyncClient: | ||
if http_client is not None: | ||
http_client.base_url = base_url | ||
http_client.headers = headers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should also pass timeout
, verify
, proxy
, here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't pass those as I don't want them to be override the options for httpx
client the developer will pass. The only options we need to maintain are the base_url
and headers
. The others should be manually configured by the developer if they are passing their own httpx
client.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it, let us at least deprecate the usage of the other params in favor of the httpx client as in https://github.com/supabase/functions-py/pull/201/files#r2083278694
What kind of change does this PR introduce?
Allow developers to supply their own httpx client
What is the current behavior?
Httpx client isn't very configurable and has limited options available for the developer
What is the new behavior?
Httpx client can now be configured by the developer and be supplied to the Postgrest library
Additional context
Add any other context or screenshots.