This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WebRequest started it all. HttpWebRequest, FtpWebRequest, FileWebRequest, etc. | |
// Initial values when starting. The represents an object wrapping the platform/system proxy configuration settings. | |
// On Windows, these settings are from the IE setting dialog ("Wininet settings"). | |
Console.WriteLine(WebRequest.DefaultWebProxy); // Internal type "System.Net.WebRequest+WebProxyWrapper" | |
Console.WriteLine(WebRequest.DefaultWebProxy.Credentials); // "null" | |
// HttpWebRequest has a single property, 'Proxy'. If null, it should not use a proxy. If non-null, then it | |
// should use a proxy. The initial value is non-null and the proxy to use is the platform/system proxy. | |
HttpWebRequest hwr = WebRequest.CreateHttp("http://www.contoso.com"); |