Skip to main content

Command Palette

Search for a command to run...

πŸ“¬ HTTP Explained Like You're 5

Published
β€’2 min read
S

Building AI systems and writing about how they actually work. Master of AI @ University of Technology Sydney. Previously B.Tech CS with focus on IoT. I believe the best way to learn is to explain. That's why I'm documenting tech concepts with simple analogies (@sreekarreddy.com). AWS Certified β€’ Azure AI Certified β€’ Neo4j Professional β€’ Google Data Analytics When not coding: exploring Sydney, working on side projects, and teaching tech to anyone who'll listen.

The postal service of the web

Day 15 of 149

πŸ‘‰ Full deep-dive with code examples


Sending Mail

When you send a letter:

  1. Write your message
  2. Put in envelope with address
  3. Post office delivers it
  4. Recipient reads and replies
  5. Reply comes back to you

HTTP works the same way for websites!


How Web Pages Work

Your browser wants to see google.com:

Browser: "Dear Google, please send me your homepage"
                    ↓ (travels over internet)
Google: "Sure! Here's the HTML, CSS, and images"
                    ↓ (travels back)
Browser: "Got it!" (shows you the page)

This each way trip is an HTTP Request/Response.


The Message Format

Request (what you ask for):

GET /search?q=cats
Host: google.com
  • GET = I want to read something
  • /search?q=cats = the specific page
  • Host: google.com = who I'm asking

Response (what you get back):

200 OK
Content-Type: text/html

<html>Here's your page!</html>
  • 200 OK = Success! βœ…
  • 404 Not Found = Page doesn't exist ❌

Common HTTP Methods

MethodWhat it does
GETRead data
POSTSend new data
PUTUpdate data
DELETERemove data

In One Sentence

HTTP is the language browsers and servers use to send requests and receive responses over the web.


πŸ”— Enjoying these? Follow for daily ELI5 explanations!

Making complex tech concepts simple, one day at a time.

More from this blog

esreekarreddy

132 posts