DEV Community

Cover image for The Internet Needed a Common Language ๐ŸŒ
Shubhangi
Shubhangi

Posted on Edited on

The Internet Needed a Common Language ๐ŸŒ

How does the browser even say, show me the products ?

Does it send English? Hindi? Morse code? Carrier pigeons? ๐Ÿ•Š๏ธ
No.

The internet has a language.

Itโ€™s called HTTP.

Think of HTTP as restaurant etiquette. Imagine walking into McDonaldโ€™s.
Instead of ordering Burger, you say :

  1. One McAloo Tikki meal.๐Ÿ”

  2. Large fries.๐ŸŸ

  3. Coke.๐Ÿง‹

  4. Takeaway.๐Ÿ“ฆ

Everything follows a format. HTTP does exactly that.

It tells browsers: hereโ€™s how you ask nicely.

And servers: hereโ€™s how youโ€™re supposed to answer.

HTTP defines the request format, response format, methods, headers, URLs, and status codes so both sides follow the same rulebook.

The internet has five favourite verbs.

  1. GET : Iโ€™m just looking.
  2. POST : Iโ€™m sending something.
  3. PUT : Replace everything.
  4. PATCH : Just change this one thing.
  5. DELETE : Adios.

Congratulations.

You now know 80% of the HTTP methods youโ€™ll use daily.

๐Ÿง  So farโ€ฆ

โœ… Browser asks.

โœ… Server answers.

โœ… HTTP keeps everyone civilised.

The browser finally knows how to talk.

But wait ๐Ÿซท

We still have a small problem.

Java has absolutely no idea what HTTP means.

Let's decode this in the next one. Stay tuned!

Top comments (0)