title: How to use HttpWebRequest.Credentials Property for Basic Authentication?
body: <p>How can I use the Webrequest <code>Credentials</code> Property to send an basic authentication header?
  Why isn't the Authorization header send with the request even when<code>PreAuthenticate</code> is set to true?</p>
  
  <pre><code>WebRequest request = (HttpWebRequest)WebRequest.Create("https://api.github.com/user");
  request.Credentials = new NetworkCredential("githubUsername", "githubPassword");
  request.PreAuthenticate = true;
  var response = request.GetResponse();
  </code></pre>