Introduction
When you use the internet, your device often needs to ask a website for information or send information to it. Knowing how these requests work helps you understand how websites and apps communicate behind the scenes.
Imagine you are at a library. When you ask the librarian for a book, you are making a GET request to get information. When you fill out a form to donate a book, you are making a POST request to send information that changes the library's collection.
┌─────────────┐ GET Request ┌─────────────┐
│ Your │─────────────────────────▶│ Website │
│ Device │ │ Server │
└─────────────┘ └─────────────┘
▲ │
│ │
│ Response with Data │
└───────────────────────────────────────┘
┌─────────────┐ POST Request ┌─────────────┐
│ Your │─────────────────────────▶│ Website │
│ Device │ │ Server │
└─────────────┘ └─────────────┘
▲ │
│ │
│ Response Confirming Receipt │
└───────────────────────────────────────┘