Quiz Entry - updated: 2026.07.14
What are the main parts of an HTTP request?
An HTTP request is made of a method, a URL path, optional query parameters, headers, and an optional body.
POST /customer.php?first=John&last=Doe HTTP/1.1
Host: www.example.com
Content-Length: 30
Content-Type: application/json
{"message": "Hello World!", "year": 2023}
| Part | Description | Example |
|---|---|---|
| Method | Action type | GET, POST, PUT, DELETE |
| Path | Resource location | /customer.php |
| Query params | Key-value pairs in URL | ?first=John&last=Doe |
| Headers | Metadata | Content-Type: application/json |
| Body | Request payload | JSON data (optional) |
Important: GET and DELETE requests should NOT have a body (only POST, PUT, PATCH).