title: RestSharp - Authorization Header not coming across to WCF REST service
body: <p>I am trying to call a locally hosted WCF REST service over HTTPS with basic auth.</p>
  
  <p>This works and the Authorization header comes thru just fine and all is happy:</p>
  
  <pre><code>ServicePointManager.ServerCertificateValidationCallback = ValidateServerCertficate;
  var request = (HttpWebRequest)WebRequest.Create("https://localhost/MyService/MyService.svc/");
  request.Method = "GET";
  request.ContentType = "application/json";
  request.Headers.Add(
    System.Net.HttpRequestHeader.Authorization,
    "Basic " + this.EncodeBasicAuthenticationCredentials("UserA", "123"));
  
  WebResponse webResponse = request.GetResponse();
  using (Stream webStream = webResponse.GetResponseStream())
  {
      if (webStream != null)
      {
          using (StreamReader responseReader = new StreamReader(webStream))
          {
              string response = responseReader.ReadToEnd();
          }
      }
  }
  </code></pre>
  
  <p>When I try to use RestSharp however, the Authorization header never comes thru on the request:</p>
  
  <pre><code>ServicePointManager.ServerCertificateValidationCallback = ValidateServerCertficate;
  
  var credentials = this.EncodeBasicAuthenticationCredentials("UserA", "123");
  
  var client = new RestSharp.RestClient("https://localhost/MyService/MyService.svc/");   
  var restRq = new RestSharp.RestRequest("/");
  restRq.Method = Method.GET;
  restRq.RootElement = "/";
  restRq.AddHeader("Authorization", "Basic " + credentials);
  var restRs = client.Execute(restRq);
  </code></pre>
  
  <p>What am i doing wrong with the RestSharp method?</p>
  
  <p>I know that the AddHeader method works because this:</p>
  
  <pre><code>restRq.AddHeader("Rum", "And Coke");
  </code></pre>
  
  <p>will come thru, only "Authorization" seems stripped out/missing.</p>