HTTP and REST APIs

Lesson 01 · 9 min

Request and response

The browser asks, the server answers. Everything else is detail of that conversation.

9 minLesson 1 of 9Practice includedAsk AI on any point

HTTP is a text protocol. A client (a browser, a mobile app, another server) sends a request: a method, an address, headers, and sometimes a body. The server returns a response: a status code, headers, and a body. One exchange is one question and one answer; the server remembers nothing between requests.

A raw request and response
AI

You can ask about this rule«HTTP has no memory»

  • A URL is scheme + host + path + query: https://shop.example/api/users?page=2.
  • The Network tab in DevTools shows every request: the best HTTP textbook there is.
  • HTTPS is the same HTTP inside an encrypted channel.
AI

You can ask about this point«Lesson summary»

Check

Lock it in before you move on

  1. 1. What does every HTTP response have?

  2. 2. Does the server remember the client's previous request on its own?

  3. 3. Where is the query string in /users?page=2?

PracticeSolve the lesson tasksA few short tasks in the editor. Check your code right away and see where it goes wrong.Start practice