【发布时间】:2016-03-11 19:45:47
【问题描述】:
所以我坐在这里将 Postman 的 POST 请求发送到我的 web api。我定义了 RCV、SND 和 TXT 变量 x-www-form-urlencoded。
在服务器端我定义了一个方法
public ActionResult Receiver(string RCV, string SND, string TXT)
这是行不通的。但是,如果我创建
public ActionResult Receiver()
然后就可以了。如何让 web api 方法捕获 x-www-form-urlencoded 参数?
【问题讨论】:
-
请求的负载是什么? (我的意思是原始字符串)
标签: c# asp.net-web-api