Use proxy in C # Portable Class Library (Microsoft.Net.Http)
2 answers
It seems you can use your own implementation IWebProxy
(I haven't tested it on WinRT, but it works on desktop since HttpClient
)
class MyProxy : IWebProxy
{
private readonly Uri _proxyUri;
public MyProxy(Uri proxyUri)
{
_proxyUri = proxyUri;
}
public ICredentials Credentials { get; set; }
public Uri GetProxy(Uri destination)
{
return _proxyUri;
}
public bool IsBypassed(Uri destination)
{
return false;
}
}
+1
source to share
The HttpClient seems to exist in PCL which can be used like this: Using a proxy with .NET 4.5 HttpClient (You can find the answer in this if I see it correctly)
0
source to share