如何在.net中模拟post方式提交json数据
1个回答
2016-05-02
展开全部
WebClient client = new WebClient();
NameValueCollection list = new NameValueCollection();
list.Add("id", "11111");
list.Add("name", "lee");
client.UploadValues("目标URL", list);
//目标页面获取值 request.form["id"]
NameValueCollection list = new NameValueCollection();
list.Add("id", "11111");
list.Add("name", "lee");
client.UploadValues("目标URL", list);
//目标页面获取值 request.form["id"]
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询