1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-10-08 12:21:10 +00:00

proxy authentication added

This commit is contained in:
Illia Bielkin
2019-02-02 21:55:57 +02:00
parent a56de43ca3
commit 5fad5a4d8e
4 changed files with 31 additions and 3 deletions
+2 -1
View File
@@ -54,9 +54,10 @@ namespace CryptoExchange.Net.Requests
public Uri Uri => request.RequestUri;
public void SetProxy(string host, int port)
public void SetProxy(string host, int port, string login, string password)
{
request.Proxy = new WebProxy(host, port);
if(!string.IsNullOrEmpty(login) && !string.IsNullOrEmpty(password)) request.Proxy.Credentials = new NetworkCredential(login, password);
}
public async Task<Stream> GetRequestStream()