C# login with cookie and fiddler2

http://blog.codeblack.nl/post/HttpWebRequest-HttpWebResponse-and-cookies.aspx

 

CookieContainer cookieContainer = new CookieContainer();
 
HttpWebRequest firstRequest = (HttpWebRequest)HttpWebRequest.Create(url);
request.CookieContainer = cookieContainer;
 
HttpWebResponse firstResponse = (HttpWebResponse)firstRequest.GetResponse();
 
HttpWebRequest secondRequest = (HttpWebRequest)HttpWebRequest.Create(url);
request.CookieContainer = cookieContainer;
 
HttpWebResponse secondResponse = (HttpWebResponse)secondRequest .GetResponse();

你可能感兴趣的:(fiddler)