SONUB home EN English 한국어 日本語 中文 हिन्दी বাংলা اردو Español Português Français Deutsch Русский العربية Bahasa Indonesia Tiếng Việt ไทย Türkçe

How to enable notifications

Notifications are unavailable in this browser or on this address. Try a supported browser on the secure SONUB site.

If notifications are blocked, allow them in your browser settings.

  1. Open the site controls beside the address bar, or your browser’s site settings. Set Notifications for this site to Allow.
  2. In your device settings, allow notifications for your browser and check Do Not Disturb or Focus.
  3. Return to SONUB, reload the page, and use the bell to enable notifications.

On iPhone or iPad, add SONUB to your Home Screen, open it there, then allow notifications.

All Vibe Coding topics
VIBE CODING

Web Client

Everything that asks a for something.

Chrome is a web , and so is a single line of . In this chapter you type an by hand, wrap it into a script, learn curl properly, and then open Chrome's to watch the very same messages fly past.

curl: the client you will use every day

curl does properly what our script does roughly: , HTTPS, headers, uploads, timeouts, . It is on almost every machine, and it is the standard way to test a server without a browser in the way.

terminal
# body only
curl http://localhost:8084

# body plus the response headers
curl -i http://localhost:8084

# the whole exchange, request headers included
curl -v http://localhost:8084

The options that matter

OptionWhat it does
-iShow the response headers as well as the body. The first thing to reach for when a page is not what you expected.
-vVerbose: show the request you sent and the response you got, line by line, including the connection itself.
-LFollow redirects. Without it, a 301 gives you an almost empty response instead of the page you wanted.
-o FILESave the response to a file instead of printing it. This is curl as a download tool.
-H "Name: value"Add a request header — a content type, an authorisation token, a language preference.
-X POST -d "data"Send data instead of just asking. Adding data implies , and this is how you test a form or an API from the terminal.
-sSilent: no progress meter. Use it whenever the output feeds into another command or a script.
-A "name"Pretend to be a particular browser. Some sites answer differently depending on who is asking.

Calling an API

Most of what a modern app talks to is not a page but an API returning . curl fetches it, and jq makes it readable — together they are how you check an before writing a single line of application .

terminal
# fetch JSON and pick one field out of it with jq
curl -s https://api.github.com/repos/sveltejs/svelte | jq '.stargazers_count'

# send JSON with POST
curl -X POST https://httpbin.org/post \
  -H 'Content-Type: application/json' \
  -d '{"name":"SONUB","level":1}'

# download to a file
curl -L -o page.html https://sonub.com

Get into the habit of testing with curl first. If curl gets the right answer, the server is fine and the bug is in your application; if curl gets the wrong answer, you have saved yourself an afternoon of looking in the wrong place.

You mark this yourself. Nothing is graded here.

Mark this step as understood?

This cannot be undone yet, so mark it only when you really understand.

Marked as understood

You mark this yourself. Nothing is graded here.