I have code to launch an http request from this code on githb.
How do I add a proxy to my http request?
public HttpRequestMessage MakeRequest(HttpMethod method, string url, IEnumerable<KeyValuePair<string, string>> args = null, string proxy)
{
HttpRequestMessage content = new HttpRequestMessage(method, GetRequestUrl(url));
if (args is null)
args = Enumerable.Empty<KeyValuePair<string, string>>();
content.Headers.Add("X-MBX-APIKEY", Client.APIKey);
if (method == HttpMethod.Get)
{
content.RequestUri = new Uri(content.RequestUri.OriginalString +
CreateQueryString(BuildRequest(args)));
} else content.Content = new FormUrlEncodedContent(BuildRequest(args));
return content;
}