http-messages Flashcards

1
Q

What is a client?

A

A client is a computer or a program that, as part of its operation, relies on sending a request to another program or a computer hardware or software that accesses a service made available by a server (which may or may not be located on another computer). For example, web browsers are clients that connect to web servers and retrieve web pages for display. Email clients retrieve email from mail servers.

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 (computer program) that provides functionality for other programs or devices, called “clients”. This architecture is called the client–server model. Servers can provide various functionalities, often called “services”, such as sharing data or resources among multiple clients, or performing computation for a client. A single server can serve multiple clients, and a single client can use multiple servers. A client process may run on the same device or may connect over a network to a server on a different device.[1]

program or service that listens to incoming requests and responds to them

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

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

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, port, and domain are usually characterized by the request context. The format of this request target varies between different HTTP methods

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

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

A

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.

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

What are HTTP headers?

A

HTTP headers from a request follow the same basic structure of an HTTP header: a case-insensitive string followed by a colon (‘:’) and a value whose structure depends upon the header. The whole header, including the value, consist of one single line, which can be quite long.

HTTP headers for responses follow the same structure as any other header: 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.

An HTTP header is a field of an HTTP request or response that passes additional context and metadata about the request or response. For example, a request message can use headers to indicate it’s preferred media formats, while a response can use header to indicate the media format of the returned body.

Medata associated wioth a request or response

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

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

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

A

No

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