我可以通过http连接,但无法连接https。
HttpRequestException 消息:
发送请求时出错。System.Net.WebExceptionStatus.TrustFailure
HttpClientHandler clienthandler = new HttpClientHandler();
HttpClient client = new HttpClient(clienthandler);
HttpRequestMessage req = new HttpRequestMessage(HttpMethod.Post, "https://www.google.com.hk/");
req.Headers.Referrer = new Uri("https://www.google.com.hk/");
HttpResponseMessage mes = await client.SendAsync(req);