HTTP Messages Flashcards

1
Q

What is a client?

A

Service Requestor - client that asks for something

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a server?

A

a server is a piece of computer hardware or software

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which HTTP method does a browser issue to a web server when you visit a URL?

A

GET Method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What three things are on the start-line of an HTTP request message?

A

Method
Place to go
Which version

General headers, like Via, apply to the message as a whole.

  1. 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).
  2. 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).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What three things are on the start-line of an HTTP response message?

A
  1. The protocol version, usually HTTP/1.1.
  2. A status code, indicating success or failure of the request. Common status codes are 200, 404, or 302
  3. 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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are HTTP headers?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Is a body required for a valid HTTP request or response message?

A

An optional set of HTTP headers specifying the request, or describing the body included in the message.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly