Loading Depth Study
Preparing your workspace
HTTP headers carry metadata about requests and responses, while the Content-Type header describes the representation format of the body.
Headers can communicate information about authentication, caching, accepted formats, cookies, content type, and many other behaviors. When a client sends JSON, it commonly uses Content-Type: application/json so the server knows how to interpret the body. Headers are also used in responses to control browser and client behavior.
A frontend can send JSON to an API with a Content-Type header and an Authorization header containing an access token.
POST /api/login
Content-Type: application/json
Authorization: Bearer TOKEN
{
"email": "user@example.com",
"password": "example"
}The server receives metadata in the headers and JSON data in the request body.