World map

 

BM: Baca dalam Bahasa Melayu

World L3: Phone Lines

HTTP with curl -v

You will learn: to read an HTTP order and its reply: methods, status codes and headers.

Checked with Linux (Debian 13) on 1 Nov 2026

The problem

You are you in /home/you. 0 things here. Services: cron running, ssh running, nginx running.

You are hereyou@kedai:~$

Folder ~

Empty folder

+ 3 hidden (ls -a)

Services

  • cronrunningstarts at boot
  • sshrunningstarts at boot
  • nginxrunningstarts at boot

Phone lines (network) Address 10.0.0.5

Listening ports

  • :22 sshd
  • :80 nginx

The promo page shows 404 Not Found. Is the shop broken? Or is the page just missing? The number tells you.

Watch

HTTP: How orders are spoken at a web counter: a method and a path, then a status code and the food. is how orders are spoken at a web counter. curl -v shows the whole talk. Lines with > are what curl said. Tap them.

Tap every line curl said.

0 of 3 found

Try it

The reply starts with a status code. The first digit tells the story. Sort them.

Drag a card into a box. Or tap the card, then tap the box.

        Try it

        Order the menu and watch the whole talk. Find the status line.

        You are you in /home/you. 0 things here. Services: cron running, ssh running, nginx running.

        You are hereyou@kedai:~$

        Folder ~

        Empty folder

        + 3 hidden (ls -a)

        Services

        • cronrunningstarts at boot
        • sshrunningstarts at boot
        • nginxrunningstarts at boot

        Phone lines (network) Address 10.0.0.5

        Listening ports

        • :22 sshd
        • :80 nginx

        Predict

        curl -sI localhost/staff.html says 403 Forbidden. What is the likely cause?

        Pick one answer.

        Check

        Build the command that asks only for the top of the reply: status and headers.

        Tap the pieces in the right order.

        …

        You did it!

        You can now read an HTTP reply: the status code, the headers and the body.

        Go deeper (optional)

        Other methods: POST sends something, PUT replaces, DELETE removes. Headers carry facts like Content-Type. In scripts, curl -f fails on 4xx and 5xx: exit code 22. curl -L follows a redirect (3xx).

        Real mission

        1. curl -sI https://example.com
        2. curl -sv -o /dev/null https://example.com

        0 of 2 steps done · Your ticks are saved.