DEV Community

Adilakshmi Bonala
Adilakshmi Bonala

Posted on

Introduction To REST APIs

In our daily life, we are using different applications and web pages to get data from different resources. (EX: Online Shopping, Online Food Ordering). Have you ever thought about how we are getting the data??

Now let's dive into the post for a solution...

Behind the scene what is happening in the client(the application which you are using) will send a request to the server and the server sends the response to the client.

The communication between the client and service happens through APIs (Application Programming Interface).

Why we need REST APIs:

For client-server communication we have other protocols(SOAP) also but why REST??

Let us discuss an example, you requested the service to get non-veg items details now the server sends an entire web page of details instead of non-veg items details..do you think that it is an apt solution?? Well, I am assuming the fact that you would say NO.

Since, you would prefer the data to be returned in the form of a structured format of JSON or XML, rather than the complete Web page. This is where REST APIs come into the picture. REST APIs create an object and thereafter send the values of the object in response to the client.

REST suggests creating an object of the data requested by the client and sending the values of the object in response to the user.

It uses lesser bandwidth to make the application more suitable for the internet.

Now you got an idea about REST APIs(often known as the language of the internet)...

THANK YOU.

Top comments (0)