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

    public async Task<IActionResult> Post(Guid id, [FromBody]x y)
      return NoContent();
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.