A RESTful Web Service on the other hand, which can also be called a REST API is based on representational state transfer architectural style and provides stateless operations for managing data using the structured web service annotations
Common http requests include :
Get : get data from server
POST/PUT : put new data in the server
DELETE : delete data from the server
After we made GET request, the server responses the request to the app including data and image url’s. The server response has formatted data. Common web formats are:
In most cases it is formatted in json. Retrofit automatically serialises the JSON response using a POJO(Plain Old Java Object) which must be defined in advanced for the JSON Structure. To serialise JSON we need a converter to convert it into Gson first.