在C#HttpWebRequest 设置超时方法
HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;//创建请求对象 request.Timeout = 2000; request.Method = "POST";//请求方式 request.ContentType = "application/json";//链接类型
request.Timeout = 2000;
使用方法:
https://www.cnblogs.com/txwtech/p/15040389.html
欢迎讨论,相互学习。
cdtxw@foxmail.com