-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
Description
Is your feature request related to a problem?
I have a scenario where for each request I need to change host (post bulk requests to ElasticSearch cluster nodes).
Describe the solution you'd like
It would be nice to be able to pass base_url
as request method argument that has priority over base_url
initialized from __init__
. All the logic of joining urls is delegated to library.
Describe alternatives you've considered
-
I think to set it via assignment to
session._base_url
protected attribute is not possibly safe way due to asynchronous execution. -
We could also use
url
parameter to build full url, but in this case we can encounter next problems:
-
Also we could create
yarl.URL
objects for parts of URL, joining them and pass tourl
parametersr, but as I said before I think this logic should be delegated to library.
Related component
Client
Additional context
No response
Code of Conduct
- I agree to follow the aio-libs Code of Conduct