Generated Csharp client - How to set specific timeout for an operation
See original GitHub issueI’ve seen that the C# client can get HttpClients from a CreateHttpClientAsync
method that I provide. This gives me a way to set HttpClient.Timeout
However this will be standard across my client. I’d rather just set it for one particular operation I know is slow.
Any decent way to achieve this?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
c# - Change default timeout
The default timeout of an HttpClient is 100 seconds. HttpClient Timeout. You can adjust to your HttpClient and set a custom timeout duration ......
Read more >HttpClient.Timeout Property (System.Net.Http)
Gets or sets the timespan to wait before the request times out. ... The timeout specified is less than or equal to zero...
Read more >HttpWebRequest.Timeout Property (System.Net)
Gets or sets the time-out value in milliseconds for the GetResponse() and GetRequestStream() ... The value specified is less than zero and is...
Read more >Better timeout handling with HttpClient - Thomas Levesque
The timeout is defined at the HttpClient level and applies to all requests made with this HttpClient ; it would be more convenient...
Read more >Retries and timeouts - AWS SDK for .NET
The AWS SDK for .NET enables you to configure the request timeout and socket read/write timeout values at the service client level. These...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Any way to add PrepareMyMethodRequest to c# and typescript client generators?
Same question for js/ts fetch client. Timeout option is not available in config file.