POST

POST creates a new item from the JSON in the request body. The DAO inserts it and returns it with its new id, and the action answers 201 Created with CreatedAtAction, which also says where the new item lives. Invalid bodies get 400 automatically.

Updated

Cheat sheet: POST
Category
ASP.NET Core
Level
Journeyman
Tags
aspnet-core, CreatedAtAction, Model Validation, POST, Problem Details, rest-api