Reputation: 840
I need to be able to detect if navigating to a particular URL requires hitting a proxy server. Some ideas as well as c# (or Java) code would be appreciated.
Thanks for your time DTM
Upvotes: 1
Views: 368
Reputation: 2790
WebRequest.DefaultWebProxy gives you access to the proxy, and then you can feed your URL to GetProxy()
and see what it returns:
Console.WriteLine(WebRequest.DefaultWebProxy.GetProxy(new Uri("http://stackoverflow.com")));
Upvotes: 1