到目前为止我一直使用:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(targetUri);
do the request
.................
request.ServicePoint.
现在我想使用 .net 4.5 中的新 HttpClient ,但我不知道如何访问 ServicePoint 属性。
任何想法如何使用 HttpClient 访问 ServicePoint?
我相信你将不得不使用ServicePointManager来做你想做的事。就像是;
ServicePointManager.FindServicePoint(targetUri)