31.10.2024
Linux
Understanding HTTP Requests in Linux: Structure, Methods & Examples
3. PUT
- Purpose: Update an existing resource or create a new one if it doesn’t exist.
- Characteristics:
- Idempotent (repeating the request produces the same result).
Example:
PUT /api/users/123 HTTP/1.1
Content-Type: application/json
{
"name": "Jane Doe",
"email": "jane@example.com"
}
4. DELETE
- Purpose: Remove a resource from the server.
- Characteristics:
- Idempotent (repeating the request does not change the result).
Example:
5. PATCH
- Purpose: Apply partial modifications to a resource.
- Characteristics:
- Not necessarily idempotent.
Example: