Better timeout handling with HttpClient

added by DotNetKicks
2/25/2018 6:09:20 PM

3 Kicks, 352 Views

If you often use HttpClient to call REST APIs or to transfer files, you may have been annoyed by the way this class handles request timeout. There are two major issues with timeout handling in HttpClient: The timeout is defined at the HttpClient level and applies to all requests made with this HttpClient; it would be more convenient to be able to specify a timeout individually for each request.