Search code examples
angularrestpublic

What exactly is meant by 'The data should be queried from a public accessible REST API'?


I want to build an app that should show updated corona cases worldwide. One of the instructions says that the data should be queried from a public accessible REST API. What exactly is meant by this and is it possible to achieve this with angular?

Thank you!


Solution

  • An API is an interface to communicate with,usually we saw that in the server with the form of endpoind (I'm talking about REST), the server will be connect to a database where you have ... data.

    YOur objectiv is to get data about corona so your front angular will have to get data, since you cannot directly interact with database that's not your's will ask an API some data -> in tech you will make a request on an endpoint like (https://thismyurl/allcovidvalue) <- (fake url) and a serveur will respond.

    You have to find an api that have data about corona and a public API (free to use so)

    To do it in angular I recommand to use HttpClient