HTTP Request Methods
The main ones that I am familiar with are
To test these things, you can either use Postman, or use
GET: Retrieves a representation of a resource from the server. GET requests are read-only and should not have any side effects on the server.
POST: Submits data to the server to create a new resource. POST requests typically include data in the request body and are used for creating new entities on the server.
curl -X POST http://localhost:5001/api/10432
PUT: Updates an existing resource on the server. PUT requests typically include data in the request body and replace the entire resource with the provided data.
DELETE: Deletes a specified resource from the server.
PATCH: Partially updates an existing resource on the server. PATCH requests include only the specific changes or updates to be applied to the resource.
HEAD: Similar to a GET request but retrieves only the headers of the response, without the response body. It is often used to check the status or metadata of a resource.
OPTIONS: Retrieves the available communication options for a given resource or server. It can be used to determine the allowed HTTP methods, headers, or other capabilities.