日期:2014-05-17 浏览次数:20467 次
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://www.baidu.com");
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
{
using (StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8))
{
return reader.ReadToEnd();
}
}