I am trying to use HttpClient via a proxy:
var httpClientHandler = new HttpClientHandler {UseProxy = true, Proxy = new WebProxy("xxx.xxx.xxx.xxx:6762")};
var httpClient = new HttpClient(httpClientHandler) {Timeout = TimeSpan.FromSeconds(3)};
With the 3 second timeout defined in the code, requests sent via this httpClient time out. Through experimentation, I have found that I need to set the timeout to at least 30 seconds for the requests to complete. So you'd think the proxy is just being slow, right?
EXCEPT: if I run Fiddler locally and set the httpClientHandler to use "localhost:8888" (Fiddler's port) and then in turn chain Fiddler to use THE SAME proxy upstream (like in picture below), the requests come back nearly instantaneously.
What could explain such behavior?
EDIT: I should also mention that the requests I am making while seeing this behavior are all HTTPS. I know Fiddler inserts its own certificate into the certificate path, so maybe that is somehow part of the explanation, but I am not knowledgeable enough to put all the pieces together.