你的位置:首页 > 软件开发 > ASP.net > 如何在WinForm中发送HTTP请求

如何在WinForm中发送HTTP请求

发布时间:2016-06-07 11:00:05
如何在WinForm中请求发送HTTP手工发送HTTP请求主要是调用 System.Net的HttpWebResponse方法手工发送HTTP的GET请 求:string strURL = "http://localhost/Play/CH1/Service1.asmx ...

如何在WinForm中请求发送HTTP

手工发送HTTP请求主要是调用 System.Net的HttpWebResponse方法手工发送HTTP的GET请 求:

get='_blank'>string strURL = "http://localhost/Play/CH1/Service1.asmx/doSearch?keyword=";strURL +=this.textBox1.Text;System.Net.HttpWebRequest request;// 创建一个HTTP请求request = (System.Net.HttpWebRequest)WebRequest.Create(strURL);//request.Method="get";System.Net.HttpWebResponse response;response = (System.Net.HttpWebResponse)request.GetResponse();System.IO.Stream s;s = response.GetResponseStream();= new string strValue = Reader.ReadInner= strValue.Replace("&lt;","<");strValue = strValue.Replace("&gt;",">");MessageBox.Show(strValue); Reader.Close();/* 何问起 hovertree.com */

原标题:如何在WinForm中发送HTTP请求

关键词:winform

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

可能感兴趣文章

我的浏览记录