C#代码发送简单的HTTP请求

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

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.sharejs.com");
    WebResponse resp = req.GetResponse();
    StreamReader reader = new StreamReader(resp.GetResponseStream(), Encoding.ASCII);
    Console.WriteLine(reader.ReadToEnd()); }
}
}
}