HTTP and CRUD
HTTP is an extensible protocol, but 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 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
A 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 request/response are basically textual data that needs to be transferred from one point to another over the network. An API endpoint is the point of entry in a communication channel when client and server interacting.