🍪 “What’s with That Lock?” – A Snacky Guide to HTTP, HTTPS & Web Verbs

sriviveka ssriviveka s
3 min read

It was a regular day. I opened my browser to order snacks online.
Suddenly, I noticed something…
🔒 A tiny lock icon next to the website name.

Why is it there?
That one little icon started my mini adventure into how the web works.
Let me walk you through it — snack-style.

☕ Chapter 1: HTTP vs HTTPS — The Security Door

HTTP is like talking in public.
Anyone nearby can listen, maybe even interrupt.

HTTPS is like whispering in a private booth.
Only you and the website can understand the conversation — encrypted, safe, and secure.

🧪 Try it yourself:

Open these two sites:

The lock = HTTPS, your data is protected.

🛍️ Chapter 2: Welcome to the Snack Store (aka the Web)

Let’s say the website is a digital snack shop.

When you interact with it — whether browsing, buying, or editing — you use “verbs” to talk.

Let me show you the key ones in plain English:

🔎 1. “Can I See the Snacks?” → GET

Just looking around.
You ask the shopkeeper to show you shelf #3.

🧠 That’s a GET request — asking for information.

🧪 Try it:
Open this in your browser:
👉 https://jsonplaceholder.typicode.com/posts/1
You’re just viewing what’s there.

📝 2. “I Want to Order 2 Choco Pies” → POST

You’re submitting a brand-new order.

🧠 That’s a POST — sending new data to the server.

🧪 Try it (no coding!):
Go to https://hoppscotch.io

  • Method: POST

  • URL: https://jsonplaceholder.typicode.com/posts

  • Body (JSON):

{
  "snack": "Choco Pie",
  "quantity": 2
}

Hit Send
Boom! Order submitted.

🔁 3. “Actually, Make That 5” → PUT

Change your mind? You now want 5 Choco Pies.

🧠 That’s a PUT — you replace the whole order.

Use same steps in Hoppscotch:

jsonCopyEdit{
  "snack": "Choco Pie",
  "quantity": 5
}

✂️ 4. “Just Change the Flavor” → PATCH

You still want snacks — just not Choco Pie. Let’s go with Banana Pie.

🧠 That’s a PATCH — updating only the part that changed.

❌ 5. “Cancel My Order” → DELETE

You don’t want anything anymore. You cancel.

🧠 That’s a DELETE — it removes the record.

🧁 In a Nutshell:

VerbWhat It DoesIn Snack Terms
GETRetrieve infoJust looking at snacks
POSTSubmit something newOrdering snacks
PUTReplace entire dataChange the full order
PATCHChange just a partSwap the flavor
DELETERemove somethingCancel the order

🔐 And don’t forget:
If your snack order isn’t over HTTPS, anyone could snoop or steal your snacks!
That lock icon matters more than we think.

✅ You Just Learned:

  • Why https is safer than http

  • What GET, POST, PUT, PATCH, and DELETE actually do

  • How to try them out in real tools without coding!

0
Subscribe to my newsletter

Read articles from sriviveka s directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

sriviveka s
sriviveka s