The following code example shows how to use the HttpPost method to create a POST request. The method accepts two arguments, x and y. The Post method will return an ActionResult containing the contents of the form. If the request is successful, the method will return NoContent.
Shortcut: cap
[HttpPost]
[Route("/")]
public async Task<IActionResult> Post(Guid id, [FromBody]x y)
{
return NoContent();
}