C#请求接口

eg:

System.Net.WebClient WebClientObj = new System.Net.WebClient();
System.Collections.Specialized.NameValueCollection PostVars = new System.Collections.Specialized.NameValueCollection();
PostVars.Add("userid", userid);


byte[] byRemoteInfo = null;
string url = "http://~";
byRemoteInfo = WebClientObj.UploadValues(url, "POST", PostVars);
string str = System.Text.Encoding.UTF8.GetString(byRemoteInfo);

猜你喜欢

转载自www.cnblogs.com/chenze-Index/p/11756882.html
今日推荐