Ran through the basics: method, URL, headers, body.
Start by defining a web server request as an HTTP message sent from a client to a server, then break it down into its three main parts: request line, headers, and body. For each part, explain its purpose and give a concrete example, and finally mention how the server parses these components to route and process the request.
Pro tip: Emphasize that the request body is optional and its format depends on the Content-Type header, showing you understand real-world API design. Also, briefly note how components like headers enable features such as authentication, caching, and content negotiation, which are critical in system design.
State that a web server request is an HTTP message sent by a client (e.g., browser, API client) to a server, containing all information needed to process and respond.
Explain the request line consists of the HTTP method (e.g., GET, POST), the request target (URL path and query string), and the HTTP version.
List key headers such as Host, User-Agent, Accept, Content-Type, Authorization, and Cookie, and explain their role in conveying metadata and enabling features like content negotiation and authentication.
Clarify that the body is optional and carries data for methods like POST/PUT, with its format indicated by the Content-Type header (e.g., JSON, form data).
Briefly mention how the server parses these components to route the request, authenticate, and generate an appropriate response.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.