public void Init() { var option = new DotNettyClientOptions() { Proxy = new WebProxy(TestServerConstant.TestHost, TestServerConstant.ProxyPort) }; var handler = new HttpDotNettyClientHandler(option); _httpClient = new HttpClient(handler); }
public void Init() { var option = new DotNettyClientOptions() { RemoteCertificateValidationCallback = (s, s1, s2, s3) => TestServerConstant.CertThumbprint.Equals(s2.ChainElements[0].Certificate.Thumbprint, StringComparison.OrdinalIgnoreCase), }; var handler = new HttpDotNettyClientHandler(option); _httpClient = new HttpClient(handler); }
public void Init() { var option = new DotNettyClientOptions() { Proxy = new WebProxy(TestServerConstant.TestHost, TestServerConstant.AuthProxyPort) { Credentials = new NetworkCredential(TestServerConstant.ProxyUserName, TestServerConstant.ProxyPassword) } }; var handler = new HttpDotNettyClientHandler(option); _httpClient = new HttpClient(handler); }
public void Init() { var option = new DotNettyClientOptions() { RemoteCertificateValidationCallback = (s, s1, s2, s3) => TestServerConstant.CertThumbprint.Equals(s2.ChainElements[0].Certificate.Thumbprint, StringComparison.OrdinalIgnoreCase), Proxy = new WebProxy(TestServerConstant.TestHost, TestServerConstant.AuthProxyPort) { Credentials = new NetworkCredential(TestServerConstant.ProxyUserName, TestServerConstant.ProxyPassword) } }; var handler = new HttpDotNettyClientHandler(option); _httpClient = new HttpClient(handler); }
public void Init() { var handler = new HttpDotNettyClientHandler(); _httpClient = new HttpClient(handler); }