httpreqeust无法模拟keeplive=true的解决方案

httpreqeust无法模拟keeplive=true的解决方案:

增加下面这一句就可以了:

httpWebRequest.ServicePoint.GetType().GetProperty("HttpBehaviour", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).SetValue(httpWebRequest.ServicePoint, (byte)0, null)

原文地址:https://www.cnblogs.com/lanzyer/p/4136220.html