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
Enable passing a context for each client method, instead of relying on a global timeout for the entire client.
Motivation
Is your feature request related to a problem? Please describe you use case.
A global timeout for all requests isn’t flexible enough. Some requests only need a few seconds, while others may take much longer. I need to handle short-duration requests without blocking event loops, while also supporting longer ones when necessary.
Pitch
Describe the solution you would like
Solution: Follow Go’s standard pattern by adding a context.Context as the first argument for each method. This would allow us to remove the global timeout on the HTTP client, relying on the context to manage request durations. Use context.Background() when no specific context is needed.
Describe alternatives you've considered
None at the moment.
Are you willing to open a pull request?
Yes, I’m happy to implement this if the feature is accepted.
Additional context
None
The text was updated successfully, but these errors were encountered:
🚀 Feature Request Description
Enable passing a context for each client method, instead of relying on a global timeout for the entire client.
Motivation
Is your feature request related to a problem? Please describe you use case.
A global timeout for all requests isn’t flexible enough. Some requests only need a few seconds, while others may take much longer. I need to handle short-duration requests without blocking event loops, while also supporting longer ones when necessary.
Pitch
Describe the solution you would like
Solution: Follow Go’s standard pattern by adding a
context.Context
as the first argument for each method. This would allow us to remove the global timeout on the HTTP client, relying on the context to manage request durations. Usecontext.Background()
when no specific context is needed.Describe alternatives you've considered
None at the moment.
Are you willing to open a pull request?
Yes, I’m happy to implement this if the feature is accepted.
Additional context
None
The text was updated successfully, but these errors were encountered: