What is HTTP?

HTTP (HyperText Transfer Protocol) is the foundation of data communication on the web. It enables clients (like browsers) to request resources from servers and receive responses.

  • Key Features:
    • Stateless communication 📡
    • Client-server architecture 🏠
    • Uniform interface 🌐
HTTP Overview

Common HTTP Methods

These methods define the action to be performed on a resource:

GET 🐶

  • Retrieve data from a server
  • Safe and idempotent operation
  • Example: GET /api/users

POST 📦

  • Submit data to a server
  • Used for creating new resources
  • Example: POST /api/posts

PUT 🛠️

  • Update existing resources
  • Idempotent method
  • Example: PUT /api/posts/123

DELETE 🧨

  • Remove a resource
  • Irreversible operation
  • Example: DELETE /api/posts/123
HTTP Methods

HTTP Status Codes

Status codes indicate the result of a request:

  • 200 OK ✅
  • 404 Not Found ⚠️
  • 500 Internal Server Error ❌

For more details on status codes, check our HTTP Status Guide.