我对以下代码有一些问题。当 Fiddler 打开时它会运行良好,但是当 Fiddler 不运行时它会超时。
IWebProxy proxy = websiterequester.Proxy;
websiterequester = (HttpWebRequest)WebRequest.Create("http://website.com/");
websiterequester.CookieContainer = cookieJar;
websiterequester.Method = "GET";
websiterequester.Referer = "http://website.com/";
if (websiterequester.Proxy != null)
{
websiterequester.Proxy = null;
}
try
{
objStream1 = websiterequester.GetResponse().GetResponseStream();
}
catch (WebException ex)
{
return "oops";
}
objReader1 = new StreamReader(objStream1);
string thiscamebacks = objReader1.ReadToEnd();
希望大家有答案。(我在 SO 上阅读了另一个帖子,但没有一个答案对我有用)
谢谢!