title: how to send custom get HTTP request using c#?
body: <p>I want to send a request like this </p>
  
  <pre><code>GET /v1/contacts?sid=msgrsessionid
  Authorization: OAuth
  realm="yahooapis.com",
  oauth_consumer_key="dj0yJmk9nM9Y29uc3VtZXJzZWNyZXQmeD1lMg--",
  oauth_nonce="24829.2331",
  oauth_signature_method="PLAINTEXT",
  oauth_timestamp="1219450170",
  oauth_token="A%3DuqkiebGpiTJl7ThQxU.jDXXaETYyfEy3xAKPyoavokwOOcZcz8Xs_l1Nvnl._KmCEVCeLkxxT1Y6BgRqf5f98sQWHklBM_anetveR7okK_M_5XEmQ1_1reo3UgKQULT_dQT8Gao3rgz5rJxgmnYrhdWWdfgTdMQVzpbJT2aGkz59NTK1O8yXVE1EvZUCqju7WiFYu.WHNEw.9TWq3g--",
  oauth_version="1.0",
  oauth_signature="O2AQipLITO0aYHKZc9266RzC94%260af0ef7f79bfb89dd6af87589e4c97b022f594a3"  
  </code></pre>
  
  <p>I'm using the code below,but I get Unauthorized access (401) exception,what is wrong here and how do I send the above raw request as a string (like what we do with telnet) not constructed as WebRequest.</p>
  
  <pre><code>Uri address = new Uri("https://api.login.yahoo.com/oauth/v2/get_token");
  WebRequest request = WebRequest.Create(address);
  request.Method = "GET";
  request.ContentType = "application/x-www-form-urlencoded";
  StringBuilder authHeader = new StringBuilder();
  authHeader.Append("Authorization: OAuth ");
  authHeader.Append("realm=\"yahooapis.com\", ");
  authHeader.Append("oauth_consumer_key=\""+consumerKey+"\", ");
  authHeader.Append("oauth_nonce=\""+random+"\", ");
  authHeader.Append("oauth_signature_method=\"PLAINTEXT\", ");
  authHeader.Append("oauth_timestamp=\""+UnixTimeNow().ToString()+"\", ");
  authHeader.Append("oauth_token=\""+requestToken.Trim()+"\", ");
  authHeader.Append("oauth_version=\"1.0\", ");            
  authHeader.Append("oauth_signature=\""+HttpUtility.UrlEncode(consumerKey+"&amp;"+consumersecret)+"\"");
  
  request.Headers.Add(authHeader.ToString());
  </code></pre>