Reading FromUri and FromBody at the same time
问题 I have a new method in web api [HttpPost] public ApiResponse PushMessage( [FromUri] string x, [FromUri] string y, [FromBody] Request Request) where request class is like public class Request { public string Message { get; set; } public bool TestingMode { get; set; } } I\'m making a query to localhost/Pusher/PushMessage?x=foo&y=bar with PostBody: { Message: \"foobar\" , TestingMode:true } Am i missing something? 回答1: A post body is typically a URI string like this: Message=foobar&TestingMode