C#代码发送简单的HTTP请求
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Net; using System.IO; namespace WRApp { class Program { static void Main(string[] args) { WebRequest req = WebRequest.Create ("http://www.75271.com"); WebResponse resp = req.GetResponse(); StreamReader reader = new StreamReader(resp.GetResponseStream(), Encoding.ASCII); Console.WriteLine(reader.ReadToEnd()); } } } }