title: HttpClient. Default credentials to authenticate on auto discovered proxy
body: <p>Control freak disclaimer: yes, there are a lot of questions about HttpClient and proxy, but they use at least one of</p>
  
  <ul>
  <li>explicite (non default) proxy credentials</li>
  <li>explicite (non WPAD) proxy configuration</li>
  <li>deprecated Api, e. g. WebProxy.GetDefaultProxy, WebRequest and so on.</li>
  </ul>
  
  <p>According to <a href="https://github.com/dotnet/corefx/issues/7037#issuecomment-198535967" rel="nofollow noreferrer">dotnet developers</a></p>
  
  <blockquote>
    <p>if the default value of HttpClientHandler.Proxy is null, then HttpClientHandler will use IE proxy settings</p>
  </blockquote>
  
  <p>So to set right corporate proxy with HttpClient we don't need any additional actions, just</p>
  
  <pre><code>_client = new HttpClient()
  </code></pre>
  
  <p>And there is no official way to get the proxy selected.
  But how can I pass default AD credentials to authenticate on auto discovered proxy then?
  I just receive "(407) Proxy Authentication Required."</p>
  
  <p>P.S. Possibly there is another problem and running as a service under special account (especially on Linux) this code have no IE setting to use. So we need to re implement WPAD.</p>