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

Setting a timeout on the API client rather than individual API function calls #11

Closed
Callum027 opened this issue Apr 16, 2023 · 2 comments

Comments

@Callum027
Copy link

Hi there,

Is there a way to set a default _request_timeout on the ApiClient object, or perhaps the Configuration object that gets passed to it?

I'd like to set a standard timeout for all API requests I make, but from what I can see in the source and docs, the only way to set it right now is to pass _request_timeout=<timeout> for each request call.

This is a lot of work when making a lot of API calls so I was wondering if there was a simpler/more convenient way of doing it.

@Callum027 Callum027 changed the title Setting a timeout on the API client Setting a timeout on the API client rather than individual API function calls Apr 16, 2023
@Fuochi
Copy link
Contributor

Fuochi commented Apr 25, 2023

Hi @Callum027,
Sorry for my late reply. You are right, at this moment the request timeout is managed in each method.
I think your request does make sense. I'll add this to the Configuration object, but It could take few weeks.

Fuochi added a commit to devopsarr/sdk-generator that referenced this issue May 17, 2023
devopsarr bot added a commit that referenced this issue May 17, 2023
devopsarr bot added a commit to devopsarr/lidarr-py that referenced this issue May 17, 2023
devopsarr bot added a commit to devopsarr/whisparr-py that referenced this issue May 17, 2023
devopsarr bot added a commit to devopsarr/sonarr-py that referenced this issue May 17, 2023
devopsarr bot added a commit to devopsarr/radarr-py that referenced this issue May 17, 2023
devopsarr bot added a commit to devopsarr/readarr-py that referenced this issue May 17, 2023
Fuochi added a commit to devopsarr/sdk-generator that referenced this issue May 17, 2023
devopsarr bot added a commit that referenced this issue May 17, 2023
devopsarr bot added a commit to devopsarr/readarr-py that referenced this issue May 17, 2023
devopsarr bot added a commit to devopsarr/radarr-py that referenced this issue May 17, 2023
devopsarr bot added a commit to devopsarr/sonarr-py that referenced this issue May 17, 2023
devopsarr bot added a commit to devopsarr/whisparr-py that referenced this issue May 17, 2023
devopsarr bot added a commit to devopsarr/lidarr-py that referenced this issue May 17, 2023
@Fuochi
Copy link
Contributor

Fuochi commented May 29, 2023

closed with #14 it's now part of the Configuration object.
When you have both, the API call takes precedence.

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

No branches or pull requests

2 participants