更新 C# 从 NET 5 升级到 6 后开始出现此错误 -
警告 SYSLIB0014“ServicePointManager.FindServicePoint(Uri)”已过时:“WebRequest、HttpWebRequest、ServicePoint 和 WebClient 已过时。请改用 HttpClient。
var servicePoint = ServicePointManager.FindServicePoint(requestUri.GetEndpoint());
if (servicePoint.ConnectionLeaseTimeout == -1){}
Run Code Online (Sandbox Code Playgroud)