Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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));
        }