Search code examples
proxyxml-rpcwinhttp

Can one encapsulate Xml Rpc call within an winhttp object?


Is it possible to encapsulate an Xml Rpc call within an Winhttp 5.1 object ? The reason I am asking this is because as far as I know Winhttp automatically resolves any proxy settings which I do not know beforehand for each user. I also don't want to set the proxy for each xml rpc call I make by hand since my users are all over the country.

Thx for any suggestions.


Solution

  • This helped me :

    var url = new Uri("http://www.example.com/");
    string ProxyUrl = WebRequest.DefaultWebProxy.GetProxy(url).ToString();