You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The decorator allows you to specify a base_url value that is prepended to all attributes, making it simple to relocate a set of endpoints into whatever web space you want to serve. The example in the docs is instructive but I won't repeat it here.
I took a look at the endpoint documentation, and it's not quite what I'm looking to do, since it looks like I would need to abstract all of my endpoints into a class, versus something simple like:
classMyClient(APIClient):
base_url="https://google.com"c=MyClient()
something=c.get("/something") # Automatically prepends base URL
Is your feature request related to a problem? Please describe.
I would like to make requests without the full URL.
Describe the solution you'd like
I'd like to define a class or instance attribute
base_url
that is automatically prepended to the endpoint passed intoget
,post
, etc.Describe alternatives you've considered
Considering subclassing, but it feels like this is a fundamental feature. Did I miss it in the documentation?
The text was updated successfully, but these errors were encountered: