YES, http is just a WhatsApp message send over TCP!

YES, http is just a WhatsApp message send over TCP!

ยท

1 min read

Send your friend this message on WhatsApp.

GET /hello-world HTTP/1.1
Host: www.example.com
User-Agent: WhatsApp Web
Accept: text/plain

๐Ÿ‘‹ Hey server, how's it going? Can you send me some plain text, please? Thanks! ๐Ÿ™Œ

your friend responds with

HTTP/1.1 200 OK
Content-Type: text/plain

๐Ÿ‘‹ Hey there! Sure thing, here's your plain text response:
"Hello, world! ๐ŸŒ"

as you can see, we have successfully sent a http request to your friend and have received a http response back.

Now there is a new question how you convert this text into object! We parse it! Parsing is the process of converting text into object following a grammar. Leaning more by asking GPT, have a nice life bye!

ย