[E] Fetch API
This exercise shows how to use JavaScript with the Fetch API to work with a REST API like the one used in the quiz server in A2.
Using the Fetch API to talk to a REST server
In the exercise "Using the Fetch API to talk to a REST server" you will learn about the Fetch API.
Figure. This is how it looks when you work through the exercise.
This exercise shows you how to get going with the Fetch API to perform asynchronous requests to a web/REST server using JavaScript, without the page being reloaded. We will see how we can do GET requests and parse the JSON response and we will see how we can create a POST request to submit data to the server.
We will use the asynchronous programming techique with async/await.