private async Task <CustomHttpsClient> GetClient(string host, int port) { const string version = "HTTP/1.1"; var proxyUrl = Environment.GetEnvironmentVariable("http_proxy"); return(proxyUrl == null ? await CustomHttpsClient.CreateWithoutProxy(host, port, version) : await CustomHttpsClient.CreateWithProxy(host, port, version, proxyUrl)); }
static async Task <CustomHttpsClient> GetClient(string host, int port, string version) { //var proxyUrl = Environment.GetEnvironmentVariable("http_proxy"); var proxyUrl = "http://localhost:8888"; return(proxyUrl == null ? await CustomHttpsClient.CreateWithoutProxy(host, port, version) : await CustomHttpsClient.CreateWithProxy(host, port, version, proxyUrl)); }