1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
System.Net.HttpWebRequest wr = (HttpWebRequest)HttpWebRequest.Create(monurl);
wr.Method = "GET";
wr.Timeout = 5000;
wr.SendChunked = true;
wr.ContentType = "application/x-www-form-urlencoded";
wr.KeepAlive = true;
wr.AllowAutoRedirect = false;
wr.ProtocolVersion = new Version(1, 1);
wr.UnsafeAuthenticatedConnectionSharing = true;
wr.UserAgent = "Internet Explorer 9";
wr.SendChunked = false;
wr.Credentials = new NetworkCredential("user", "mdp");
HttpWebResponse wresp = null;
try
{
wresp = (HttpWebResponse)wr.GetResponse();
wresp.Close();
}
catch (Exception ex){
} |
Partager