Tuesday, 27 August 2013

Avoiding Proxy Auto Detection when using HTTPWebRequest

Avoiding Proxy Auto Detection when using HTTPWebRequest

I understand that when using the WebRequest class you have to set the
proxy property to null to stop the framework from trying to auto-detect
the proxy settings - causing a delay in request time.
Does the same hold true when using HTTPWebRequest? I.E:
HttpWebRequest client =
(HttpWebRequest)WebRequest.Create("http://google.com");
Should I be setting the proxy to null or does the Framework not try to
attempt to get the default proxy settings when using HTTPWebRequest?
client.proxy = null;

No comments:

Post a Comment