HTTP and CRUD

HTTP is an extensible protocol. However, at its core, it facilitates CRUD operations.

CRUD stands for Create, Read, Update and Delete.

Almost all internet consumer-related software uses CRUD. You use it every time you ask an application to take your new data or modify the existing one.

The basic HTTP verbs (methods) corresponding to CRUD operations are:

  • GET — retrieve a specific resource (by id) or a collection of resources
  • POST — create a new resource
  • PUT — update a specific resource (by id)
  • DELETE — remove a specific resource by id

An HTTP request, in addition to an HTTP verb, typically consists of:

  • a header, which allows the client to pass along information about the request
  • a path to a resource
  • an optional message body containing data

Here is an example of HTTP request and response taken from MDN Docs:

API Endpoint

HTTP requests/responses are textual data that must be transferred over the network from one point to another. An API endpoint is the point of entry in a communication channel when client and server interacting.