HTTP methods define the action to be performed on a resource. Here's a breakdown of the most common ones:

GET 📁

  • Purpose: Retrieve data from the server
  • Example: Fetching a webpage or API resource
  • Safety: Safe (idempotent, no side effects)
HTTP Methods Overview

POST 📝

  • Purpose: Submit data to the server
  • Example: Creating a new resource or form submission
  • Safety: Not safe (may have side effects)
POST Request Example

PUT 🔄

  • Purpose: Update a resource on the server
  • Example: Modifying existing data
  • Safety: Safe (idempotent)
PUT Request Example

DELETE 🗑️

  • Purpose: Remove a resource from the server
  • Example: Deleting a file or database entry
  • Safety: Not safe (destructive)

For more details on HTTP status codes related to these methods, visit /en/guides/http-status-codes.

Tips ✅

  • Use GET for queries, POST for submissions
  • PUT and DELETE should be used cautiously
  • Always validate input when using POST or PUT
HTTP Methods Infographic