private static HttpClient GetHttpClient(IClientConfig config)
{
var proxy = GetProxyIfAvailableAndConfigured(config);
if (proxy == null)
{
return new HttpClient();
}
else
{
return new HttpClient(
new HttpClientHandler
{
Proxy = proxy,
UseProxy = true
});
}
}
#endif