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. ππ»
Here are Top 5 Image Search and Image Recognition APIs you can use in your next project.
Thread π§΅ππ»
1οΈβ£ Imgur
- Imgur is an online image sharing and image hosting service. Imgurβs API exposes the entire Imgur infrastructure via a standardized programmatic interface.
Let's try to get a quick introduction to the REST API in the following ten tweets.
A Thread π§΅ππ»
Before jumping onto REST
An API is an Application Programming Interface that lets you connect two computers, where one computer or application requests the data from the server.
RESTful APIs are the most famous type of API.
REST APIs are APIs that follow standardized principles, properties, and constraints.
You can access resources in the REST API using HTTP verbs. ππ»