Does anyone know how I might detect if a network is using a proxy or not? In our old .NET Windows Mobile application we used the following code to get through any proxy in place, and am wondering how to replicate this in QT.
WebClient web = new WebClient();
if (web.Proxy != null)
{
web.Proxy.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
}
Regards,
-Paul
Solved! Go to Solution.
In case anyone else is wondering, the following seems to work, when placed in the Component.onCompleted section of the app:
if(AppFramework.network.proxy.type !== 2) { ArcGISRuntime.setupProxy(AppFramework.network.proxy.url) }
type 2 is "no proxy".
This seems to work so far in our scenario, am open to comments or further suggestions...
In case anyone else is wondering, the following seems to work, when placed in the Component.onCompleted section of the app:
if(AppFramework.network.proxy.type !== 2) { ArcGISRuntime.setupProxy(AppFramework.network.proxy.url) }
type 2 is "no proxy".
This seems to work so far in our scenario, am open to comments or further suggestions...