请教C#的WINFORM 如何获得一个浏览器里面地
1个回答
展开全部
string url = serverID + param;
HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
request.Method = "POST";
request.Timeout = 4000;
//默认不保活
request.KeepAlive = false;
//设置默认连接数
System.Net.ServicePointManager.DefaultConnectionLimit = 80;
HttpWebResponse response = request.GetResponse() as HttpWebResponse;
//获取返回内容
StreamReader stream = new StreamReader(response.GetResponseStream(), Encoding.UTF8);
result = stream.ReadToEnd();
HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
request.Method = "POST";
request.Timeout = 4000;
//默认不保活
request.KeepAlive = false;
//设置默认连接数
System.Net.ServicePointManager.DefaultConnectionLimit = 80;
HttpWebResponse response = request.GetResponse() as HttpWebResponse;
//获取返回内容
StreamReader stream = new StreamReader(response.GetResponseStream(), Encoding.UTF8);
result = stream.ReadToEnd();
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询