httpreqeust无法模拟keeplive=true的解决方案:
增加下面这一句就可以了:
httpWebRequest.ServicePoint.GetType().GetProperty("HttpBehaviour", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).SetValue(httpWebRequest.ServicePoint, (byte)0, null)
时间: 2024-09-30 07:39:15