日期:2014-05-18 浏览次数:21134 次
static string RegularFlowURL = "http://127.0.0.1/flowserver/html/menu_detail.php";
public static void Check()
{
try
{
System.Net.ServicePointManager.Expect100Continue = false;
Stream instream = null;
StreamReader sr = null;
HttpWebResponse response = null;
HttpWebRequest request = null;
Encoding encoding = Encoding.UTF8;
request = WebRequest.Create(RegularFlowURL) as HttpWebRequest;
response = request.GetResponse() as HttpWebResponse;
instream = response.GetResponseStream();
sr = new StreamReader(instream, encoding);
string content = sr.ReadToEnd();
MessageBox.Show(content);
}
catch (Exception ee)
{
MessageBox.Show(ee.ToString());
}