首页 > 学院 > 开发设计 > 正文

HttpWebRequest 请求数据

2019-11-17 01:44:25
字体:
来源:转载
供稿:网友
HttpWebRequest 请求数据
string fullUrl =  "http://vip.AAA.cn/PReviewInterfaceAction.action?code=vip0008&data_digest=vip&receiveprovince=广东省&receivecity=深圳市&receivearea=南山区";
 HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(fullUrl);
 //request.Method = "GET";    //POST
 string res = string.Empty;
 HttpWebResponse response = (HttpWebResponse)request.GetResponse();
 StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8);
 res = reader.ReadToEnd();
 reader.Close();
 return res;

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表