string url = "http://jiekou.56dxw.com/sms/HttpInterface.aspx?comid=123&username=test&userpwd=*****";
WebRequest wRequest = WebRequest.Create(url);
wRequest.Method = "GET";
wRequest.ContentType = "text/html;
charset=UTF-8";
WebResponse wResponse = wRequest.GetResponse();
Stream stream = wResponse.GetResponseStream();
StreamReader reader = new StreamReader(stream, System.Text.Encoding.Default);
string str = reader.ReadToEnd();
//url返回的值
reader.Close();
wResponse.Close();
推荐阅读
- ios简单的清除缓存代码
- 经验总结|SQL计算百分比
- .NET|GridView、DataGrid使用DataBound事件前提
- 在域名中检索内容(site)
- .NET|从指定的数组中,随机抽取一个数
- 【经验总结】Awk中sub函数的用法