I'm trying to set a proxy to HttpClient in UWP but I can't find any class that implement IWebProxy that I can provide to the HttpClientHandler object
1 Answer
As far as I know there is no way to specify a custom proxy for the HttpClient
class.
From this article:
For both APIs, proxy settings are automatically obtained from Internet Explorer/Microsoft Edge settings and are used for all the HTTP calls by default. This enables apps to automatically work even if the user is connected to the internet through a proxy. Neither API provides a way to specify a custom proxy for your app. However, you can choose to not use the default proxy by setting HttpClientHandler.UseProxy to false (for System.Net.Http) or HttpBaseProtocolFilter.UseProxy to false (for Windows.Web.Http).
-
-
You might be able to set it with PowerShell, though I haven't tried it myself... Check here: gallery.technet.microsoft.com/scriptcenter/… Feb 25, 2017 at 18:28