You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using (var response = await httpClient.GetAsync("http://localhost:12345/", HttpCompletionOption.ResponseHeadersRead)) // 30-second timeout but ONLY up until past the headers
49
49
{
50
50
// Do other stuff that doesn't rely on the content first, like status code validation
51
-
// ...
51
+
response.EnsureSuccessStatusCode();
52
52
53
53
var content = await response.Content.ReadAsStringAsync(); // NO TIMEOUT
0 commit comments