HttpWebRequest请求性能调优

https://mp.weixin.qq.com/s/H1irxuJd5nQt045Q6zMkEQ

 

https://blog.csdn.net/thc1987/article/details/105274477

 

方案:

1.request.ServicePoint.Expect100Continue = false; 【优先级2】

--2.使用using改写  放最后考虑 【优先级4】

3.System.Net.ServicePointManager.DefaultConnectionLimit = 200; 【优先级1】

4.

request.Timeout = Timeout.Infinite;
request.KeepAlive = true;【优先级3】

posted on 2023-12-04 11:47  雪原日暮  阅读(17)  评论(0编辑  收藏  举报