服务端代码与接口页面post交互

webclient对象实现

WebClient wb = new WebClient();                        

System.Collections.Specialized.NameValueCollection varPost = new System.Collections.Specialized.NameValueCollection();  

参数对象,对方页面接收                                 

varPost.Add("a", a);                        

varPost.Add("b", b);

varPost.Add("c", c);

byte[] RemoteInfo = wb.UploadValues(requestUrl, "POST", varPost);          

页面应答返回              

string sRemoteValue = System.Text.Encoding.UTF8.GetString(RemoteInfo);

posted on 2015-10-27 10:41  到底是不是  阅读(261)  评论(0编辑  收藏  举报