HTTP Messages Flashcards
What is a client?
Service Requestor - client that asks for something
What is a server?
a server is a piece of computer hardware or software
Which HTTP method does a browser issue to a web server when you visit a URL?
GET Method
What three things are on the start-line of an HTTP request message?
Method
Place to go
Which version
General headers, like Via, apply to the message as a whole.
- Request headers, like User-Agent or Accept, modify the request by specifying it further (like Accept-Language), by giving context (like Referer), or by conditionally restricting it (like If-None).
- Representation headers like Content-Type that describe the original format of the message data and any encoding applied (only present if the message has a body).
What three things are on the start-line of an HTTP response message?
- The protocol version, usually HTTP/1.1.
- A status code, indicating success or failure of the request. Common status codes are 200, 404, or 302
- A status text. A brief, purely informational, textual description of the status code to help a human understand the HTTP message.
General headers, like Via, apply to the whole message.
Response headers, like Vary and Accept-Ranges, give additional information about the server which doesn’t fit in the status line.
Representation headers like Content-Type that describe the original format of the message data and any encoding applied (only present if the message has a body).
What are HTTP headers?
HTTP headers let the client and the server pass additional information with an HTTP request or response. An HTTP header consists of its case-insensitive name followed by a colon (:), then by its value. Whitespace before the value is ignored.
Is a body required for a valid HTTP request or response message?
An optional set of HTTP headers specifying the request, or describing the body included in the message.