There are three main characteristics of HTTP Request Methods:
1. Safe 2. Idempotent 3. Cacheable
๐ Safe
We can call an HTTP request method safe if it doesn't affect the server's state.
The safe methods request the server to send data without performing any modification to the original data. Hence safe methods accomplish read-only operations.
๐ Idempotent
Idempotent methods have no side effects on the server. We can call them in a row, and they guarantee that they will not affect the server state (except for keeping statistics).
GET, HEAD, OPTIONS, PUT, DELETE, and TRACE methods are idempotent.
๐ Cacheable
As the term suggests, we can call HTTP response methods cacheable if it is possible to cache the response for later use.
Moving forward, what if the client or server wants to send an extra bit of information through request or respectively?
Here HTTP headers come into play. ๐๐ป
The HTTP headers are divided into four categories:
1๏ธโฃ Request headers: Client to Server
2๏ธโฃ Response headers: Server to Client
3๏ธโฃ Representation headers: Information about the body of the resource
4๏ธโฃ Payload headers: Information about the payload data
We have a well-written thread on HTTP headers. Please give it a read. ๐๐ป