
Since, you would prefer the data to be returned in the form of a structured format, rather than the complete Web page. Well, I am assuming the fact that you would say NO. But, do you think this is an apt response that you would expect when you send a request? Over here, the response sent to the client is in the form of an HTML Web Page. So, the client requests the server for the required information, via an API, and then, the server sends a response to the client. Well, this data is received from the Server or most commonly known as a Web-server. Now, where do you think we get this data from? It’s never static which implies the fact that data is always changing in these applications. Either it is movies getting released on a frequent basis, or various cities showing different languages movies at various times of the day. Now, obviously, this application needs a lot of Input data, as the data present in the application is never static. Why use REST API?Ĭonsider a scenario where you are using the Book My Show app. Now that you know what it is, let us move on and understand the need for REST API. It is often regarded as the “ language of the internet ” and is completely based on the resources. The architectural style of REST helps in leveraging the lesser use of bandwidth to make an application more suitable for the internet. This is why REST is known as Representational State Transfer. So, over here, you have an object and you are sending the state of an object.
Rest web service movie#
For example, if the user is requesting for a movie in Bangalore at a certain place and time, then you can create an object on the server-side. In a client-server communication, REST suggests to create an object of the data requested by the client and send the values of the object in response to the user. It is an architectural style that defines a set of rules in order to create Web Services. The term REST stands for REpresentational State Transfer. The following topics will be covered in this article: So in this article on What is REST API, let us look into how a client communicates with the servers to extract the required information.

However, have you ever thought, where does this data come from? Well, it’s the servers from where we get the data. Since the invention of the internet, we have been using different applications and web pages to get data for various resources.
