http-messages Flashcards
What is a client?
anything that connects to the server
What is a server?
a piece of computer hardware or software that provides functionality for other programs or devices, called “clients”.
Which HTTP method does a browser issue to a web server when you visit a URL?
Browser sends the HTTP request to the server
What three things are on the start-line of an HTTP request message?
- An HTTP method, a verb (like GET, PUT or POST) or a noun (like HEAD or OPTIONS), that describes the action to be performed.
- The request target, usually a URL, or the absolute path of the protocol
- The HTTP version, which defines the structure of the remaining message, acting as an indicator of the expected version to use for the response.
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.
What are HTTP headers?
a case-insensitive string followed by a colon (‘:’) and a value whose structure depends upon the type of the header. The whole header, including its value, presents as a single line.
Where would you go if you wanted to learn more about a specific HTTP Header?
mdn
Is a body required for a valid HTTP request or response message?
NO: Not all responses have one: responses with a status code that sufficiently answers the request without the need for corresponding payload (like 201 Created or 204 No Content) usually don’t.
what is a client
anything that connects to the server
What is a server?
a piece of computer hardware or software that provides functionality for other programs or devices, called “clients”.
Which HTTP method does a browser issue to a web server when you visit a URL?
Browser sends the HTTP request to the server
What is on the first line of an HTTP request message?
usually HTTP/1.1 . A status code, indicating success or failure of the request.
What is on the first line of an HTTP response message?
The status line It consists of three items: The HTTP version number, showing the HTTP specification to which the server has tried to make the message comply. A status code, which is a three-digit number indicating the result of the request
What are HTTP headers?
HTTP headers let the client and the server pass additional information with an HTTP request or response
Is a body required for a valid HTTP message?
no it is not, at a protocol level, but at the app level you might need it sometimes.