首页 > Windows开发 > 详细

C#访问url地址并返回数据

时间:2015-05-08 16:21:17      阅读:200      评论:0      收藏:0      [点我收藏+]
 public string getPostBackStream(string rUrl)
        {

            WebClient myWebClient = new WebClient();

            NameValueCollection myNameValueCollection = new NameValueCollection();
            myNameValueCollection.Add("title", "this is title");

            myNameValueCollection.Add("excerpt", "this is excerpt");
            byte[] responseArray = myWebClient.UploadValues(rUrl, "POST", myNameValueCollection);
            return Encoding.ASCII.GetString(responseArray);
        }

  

C#访问url地址并返回数据

原文:http://www.cnblogs.com/zzq-include/p/4487990.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!