0
我不確定我的問題是否正確,但我找不到任何相關信息。我假設HttpClient應該自動解密HTTPS響應,但出於某種原因,它不會,除非Fiddler正在運行。HttpClient不解密沒有Fiddler的HTTPS
HttpClient Client;
HttpResponseMessage response;
using (var request = new HttpRequestMessage(HttpMethod.Get, "https://www.google.com/"))
{
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("text/html"));
response = await Client.SendAsync(request);
response.EnsureSuccessStatusCode();
}
string sResponse = await response.Content.ReadAsStringAsync();
Log(sResponse); // "\u001f�\b\0\0\0\0\0\u0002��i{۸�0��\u007f\u0005͜c�c�\u0016" etc.
我試圖禁用Fiddler中的所有https相關選項並重置IE代理選項,但似乎並非如此。