Section 1 - Instruction

In our last session, we learned how browsers send HTTP requests. Now, what happens next? The server always sends a response back.

This response includes a status code—a special number that tells your browser the result of your request.

Engagement Message

Are you ready to see how this works?

Section 2 - Instruction

Think of it like ordering at a restaurant. After you place your order, the waiter might come back and give you a brief update.

A status code is that quick update. It tells your browser "Your order is ready!" or "Sorry, we're out of that dish."

Engagement Message

Why does your browser need to know the status of its request?

Section 3 - Instruction

Status codes are grouped into "families" based on their first digit. Each family represents a different type of response.

  • 2xx (Success): "Everything worked perfectly."
  • 3xx (Redirection): "This has moved, let me take you there."
  • 4xx (Client Errors): "You made a mistake."
  • 5xx (Server Errors): "We made a mistake."

Engagement Message

Which family of codes do you think you see most often?

Section 4 - Instruction

The most common status code is 200 OK, which belongs to the 2xx Success family. This means everything went perfectly—the server found what you requested and is sending it back.

It's like the waiter bringing your food and saying "Here's your order, enjoy!"

Engagement Message

Give one example of when your browser would receive a 200 OK response.

Section 5 - Instruction

Sometimes you'll see a 404 Not Found error. As a 4xx Client Error, this means the server understood the request but couldn't find the specific resource. This is usually due to a typo in the URL.

Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal