标签:class blog code http ext get
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 |
// requestUrl:地址?xx=xx private
string GetContentFromUrll( string
requestUrl) { string
_StrResponse = "" ; HttpWebRequest _WebRequest = (HttpWebRequest) WebRequest.Create(requestUrl); //创建 _WebRequest.Method = "GET" ; WebResponse _WebResponse = _WebRequest.GetResponse(); StreamReader _ResponseStream = new
StreamReader(_WebResponse.GetResponseStream(), System.Text.Encoding.GetEncoding( "UTF-8" )); _StrResponse = _ResponseStream.ReadToEnd(); _WebResponse.Close(); _ResponseStream.Close(); return
_StrResponse; } |
标签:class blog code http ext get
原文地址:http://www.cnblogs.com/Evaniko/p/3779713.html