I am beginner. Take it easy on me.
I want to set or connect proxy on that piece of code
var requestMsg = new HttpRequestMessage(GetHttpMethod(method), url);
if (method != APIMethod.GET)
{
var serializedContent = JsonConvert.SerializeObject(request);
requestMsg.Content = new StringContent(serializedContent, Encoding.UTF8, "application/json");
}
WebProxy myproxy = new WebProxy("xxx.xx.xx.xx", 8080);
requestMsg.Proxy = myproxy; <------ error
HttpResponseMessage task = await httpClientFactory.CreateClient().SendAsync(requestMsg);
please help me set proxy hard code
i read these but i cant understand
Proxy with HTTP Requests
C# Connecting Through Proxy