【发布时间】:2012-08-17 19:50:21
【问题描述】:
我在 web api 中有一个新方法
[HttpPost]
public ApiResponse PushMessage( [FromUri] string x, [FromUri] string y, [FromBody] Request Request)
请求类在哪里
public class Request
{
public string Message { get; set; }
public bool TestingMode { get; set; }
}
我正在使用 PostBody 查询 localhost/Pusher/PushMessage?x=foo&y=bar:
{ Message: "foobar" , TestingMode:true }
我错过了什么吗?
【问题讨论】:
标签: c# asp.net asp.net-web-api http-post frombodyattribute