c# post请求
踩空的旧时光
这个作者很懒,什么都没留下…
展开
-
C# WebApi POST和GET接口及对应ajax详解
一、get请求对于取数据,我们使用最多的应该就是get请求了吧。下面通过几个示例看看get请求参数传递。1、基础类型参数[HttpGet]public string GetAllChargingData(int id, string name){ return "ChargingData" + id;}$.ajax({ type: "get", url: "http://localhost:27221/api/Charging/GetAllChargi原创 2020-11-23 10:16:10 · 1787 阅读 · 0 评论 -
C# 实现post请求(application/x-www-form-urlencoded)
C#psot请求(application/x-www-form-urlencoded)1.引用 //发送的参数 string url = " "; model1 user = new model1(); user.id = " "; user.name = " "; var strPostData = ToPaeameter(user); var strResponse = PostUrl(ur原创 2020-11-19 14:03:11 · 7174 阅读 · 1 评论