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@kedai:~$Folder ~
Empty folder
+ 3 hidden (ls -a)
Services
cronrunningstarts at bootsshrunningstarts at bootnginxrunningstarts at boot
Phone lines (network) Address 10.0.0.5
Listening ports
:22sshd:80nginx
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@kedai:~$Folder ~
Empty folder
+ 3 hidden (ls -a)
Services
cronrunningstarts at bootsshrunningstarts at bootnginxrunningstarts at boot
Phone lines (network) Address 10.0.0.5
Listening ports
:22sshd:80nginx
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
curl -sI https://example.comcurl -sv -o /dev/null https://example.com
0 of 2 steps done · Your ticks are saved.
Bahasa Melayu
Halaman promo tunjuk 404 Not Found. Adakah kedai rosak? Atau halaman itu sekadar tiada? Nombor itu beritahu anda.
HTTP ialah cara pesanan disebut di kaunter web. curl -v tunjuk seluruh perbualan. Baris dengan > ialah kata-kata curl. Tekan baris itu.
Jawapan bermula dengan status code (kod status). Digit pertama bercerita. Susun mereka.
Pesan menu dan tengok seluruh perbualan. Cari baris status.
curl -sI localhost/staff.html kata 403 Forbidden. Apa puncanya yang paling mungkin?
Bina arahan yang minta bahagian atas jawapan sahaja: status dan header.
Kini anda boleh baca jawapan HTTP: kod status, header dan isinya.
You finished this before. Practice is always welcome!
Official docs: curl manual · curl: HTTP scripting · nginx: beginner's guide
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?