HTTP Flashcards

1
Q

what is a client?

A

In computing, a client is a piece of computer hardware or software that accesses a service made available by a server as part of the client-server model of computer networks.

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 that provides functionality for other programs or devices, called ‘clients’.

Servers can provide various functionalities, often called “services”, such as sharing data or resources among multiple clients, or performing computation for a client.

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
an request target
HTTP version

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

Status line, header and 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.

=> metadata about the 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

Not all requests have one: requests fetching resources, like GET, HEAD, DELETE, or OPTIONS, usually don’t need one. Some requests send data to the server in order to update it: as often the case with POST requests (containing HTML form data).

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.

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

what is on the first line of an HTTP request message?

A

HTTP method, request target(usually a URL or the absolute path of the protocol, port and domain), HTTP version

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

what is on the first line of an HTTP response message?

A

The protocol version (HTTP/1.1)
A status code (404)
A status text (Not Found)

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