title: How can I tell when HttpClient has timed out?
body: <p>As far as I can tell, there's no way to know that it's specifically a timeout that has occurred. Am I not looking in the right place, or am I missing something bigger?</p>
  <pre><code>string baseAddress = &quot;http://localhost:8080/&quot;;
  var client = new HttpClient() 
  { 
      BaseAddress = new Uri(baseAddress), 
      Timeout = TimeSpan.FromMilliseconds(1) 
  };
  try
  {
      var s = client.GetAsync(&quot;&quot;).Result;
  }
  catch(Exception e)
  {
      Console.WriteLine(e.Message);
      Console.WriteLine(e.InnerException.Message);
  }
  </code></pre>
  <p>This returns:</p>
  <blockquote>
  <p>One or more errors occurred.</p>
  <p>A task was canceled.</p>
  </blockquote>