Consumes and FromBody was needed
This commit is contained in:
@@ -22,8 +22,8 @@ namespace WebPostPartialJsonObject.Controllers
|
|||||||
{
|
{
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
[HttpPost]
|
[HttpPost, Consumes("application/json")]
|
||||||
public IActionResult Index(ExpectedViewModel data)
|
public IActionResult Index([FromBody] ExpectedViewModel data)
|
||||||
{
|
{
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user