question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Generated Csharp client - How to set specific timeout for an operation

See original GitHub issue

I’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:open
  • Created 6 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
tomasomasocommented, Feb 27, 2018

Any way to add PrepareMyMethodRequest to c# and typescript client generators?

1reaction
MrFoxProcommented, Dec 12, 2020

Same question for js/ts fetch client. Timeout option is not available in config file.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found