I am trying to unit test some code, and I need to to replace this:
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create( uri ); httpWebReque
Try with something like this:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://www.contoso.com/default.html"); request.CookieContainer = new CookieContainer(); request.CookieContainer.Add(new Cookie("ConstoCookie", "Chocolate Flavour"));