HttpClient Timeout Clarification #83530
-
When does the timer for HttpClient.Timeout start and when does it stop? Basically, I want the timeout to start after SendAsync and stop once ResponseHeaders are received. There are a few different key points I can imagine : |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It starts when SendAsync is called. It stops when the task returned from SendAsync completes, so when headers are completed with HttpCompletionOption.ResponseHeadersRead or when the body is completed with HttpCompletionOption.ResponseContentRead. |
Beta Was this translation helpful? Give feedback.
It starts when SendAsync is called. It stops when the task returned from SendAsync completes, so when headers are completed with HttpCompletionOption.ResponseHeadersRead or when the body is completed with HttpCompletionOption.ResponseContentRead.