HTTP Flashcards

1
Q

HTTP-MESSAGES

What is a client?

A

A client is a service requester within a client-server model.

  • A client usually does not share any of its resources, but it requests content or service from a server.
  • Clients, therefore, initiate communication sessions with servers, which await incoming requests
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

HTTP-MESSAGES

What is a server?

A

A server is the provider(s) of a resource or service within a client-server model.
- A server host runs one or more server programs, which share their resources with clients.

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

HTTP-MESSAGES

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

A

A complete URL, known as the absolute form, is mostly used with GET when connected to a proxy.
Example:
GET https://developer.mozilla.org/en-US/docs/Web/HTTP/Messages HTTP/1.1

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

HTTP-MESSAGES

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

A
  1. An HTTP method (verb like GET PUT POST or noun like HEAD OPTIONS) that describes the action to be performed.
  2. The request target, usually a URL, or the absolute path of the protocol, port, and domain are usually characterized by the request context.
  3. The HTTP version, which defines the structure of the remaining message, acting as an indicator of the expected version to use for the response.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

HTTP-MESSAGES

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

HTTP-MESSAGES

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.

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

HTTP-MESSAGES

Where would you go if you wanted to learn more about a specific HTTP Header?

A

MDN

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

HTTP-MESSAGES

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

A

Not all requests have one: requests fetching resources, like GET, HEAD, DELETE, or OPTIONS, usually don’t need one.

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