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
Specifying timeout with attribute #1590
Comments
There are a few options for specifying timeouts at the request level shown here: https://stackoverflow.com/questions/43315934/how-to-set-timeout-in-refit-library Seems like a reasonable feature request though.
|
@bennor Thanks for the pointer ! I would prefer the attribute, do you have an idea about a possible implementation I could try on my own ? For future reader, here is my workaround to make it "transparent" to the caller (i.e it does not break compilation with previous method) It is not really beautiful but it does the job ...
|
@glb-cblin There was a time where I would have known, but I haven't done any dev on this library (or any .NET) for years. 🙃 |
Is your feature request related to a problem? Please describe.
Sometimes, for an API with multiple routes, we'd like different timeouts for each route
At the moment, the timeout can only be specified at the HTTP client level like this :
Describe the solution you'd like
Describe alternatives you've considered
I tried to use a DelegatingHandler to acheve this BUT inside a delegating handler we have no idea about which method is called on the MyClient interface ....
In the end, we are currently using XxxClient with a single method (so we have 1 client for each route)
The text was updated successfully, but these errors were encountered: