title: How to add cookies to WebRequest?
body: <p>I am trying to unit test some code, and I need to to replace this:</p>
  
  <pre><code>  HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create( uri );
    httpWebRequest.CookieContainer = new CookieContainer();
  </code></pre>
  
  <p>with</p>
  
  <pre><code>  WebRequest webRequest = WebRequest.Create( uri );
    webRequest.CookieContainer = new CookieContainer(); 
  </code></pre>
  
  <p>Basically, how do I get cookies into the request without using a HttpWebRequest?</p>