Web Development: HTML, CSS and JavaScript
Exit

Lesson 13 of 17 · Browser and network

fetch and REST APIs: JSON, HTTP status codes and CORS

1 h Node.js 22 (Debian, git, npm, python3)

Objective

Make your page talk to a server: load the list of rooms of Riad MasterLinux from an API, send a booking, and correctly handle every possible response (success, room not found, invalid data, server down, network cut off). You will also understand the famous CORS error that every front-end developer runs into one day.

This lesson is part of the full course

Unlock Web Development: HTML, CSS and JavaScript to read every lesson, do the exercises, access the simulations and earn your certificate.

Already enrolled? Log in.