I am working with a proxy that requires authentication, i.e., in a browser if I try to open a page it will immediately ask for credentials. I supplied same credentials in my
try this
var YourURL = "http://yourUrl/"; HttpClientHandler handler = new HttpClientHandler() { Proxy = new WebProxy("http://127.0.0.1:8888"), UseProxy = true, }; Console.WriteLine(YourURL); HttpClient client = new HttpClient(handler);