C# 通过url地址获取页面内容
2021-05-02 00:27
标签:sys get 地址 highlight toe stream creat amr ade C# 通过url地址获取页面内容 标签:sys get 地址 highlight toe stream creat amr ade 原文地址:http://www.cnblogs.com/BraveBoy/p/7777228.htmlusing System.Net;
using System.IO;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://192.168.1.88:8018/test.html?name=121212");
WebResponse response = request.GetResponse();
Stream resStream = response.GetResponseStream();
StreamReader sr = new StreamReader(resStream);
Response.Write(sr.ReadToEnd());
上一篇:C#的程序结构