3. HTTP Verbs or Methods

Explore the HTTP methods (verbs) used in RESTful APIs: GET, POST, PUT, PATCH, and DELETE. Understand the purpose of each method and how they map to CRUD (Create, Read, Update, Delete) operations on resources.

HTTP methods are used to indicate the desired action to be performed on a resource. The key methods are:

  • GET: Retrieve information about a resource.
  • POST: Create a new resource.
  • PUT: Update or replace an existing resource.
  • PATCH: Partially update an existing resource.
  • DELETE: Remove a resource.

These methods align with CRUD operations (Create, Read, Update, Delete) and help define the behavior of the API.