HTTP Flashcards

1
Q

What is a client?

A

Requesters of a resource or service.

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

What is a server?

A

Providers of a resource or service.

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
  1. The HTTP Method(GET, PUT, POST, HEAD, OPTIONS etc.)
  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
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 HTTP version(usually HTTP/1.1)
  2. Status Code, indicating success or failure of the request.
  3. Status text, 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 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/response.

Describe the request or response itself.

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
9
Q

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

A
  1. The HTTP Method(GET, PUT, POST, HEAD, OPTIONS etc.)
  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
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
  1. The protocol version(usually HTTP/1.1)
  2. Status Code, indicating success or failure of the request.
  3. Status text, 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
11
Q

How to GET a html body from a url and make a file with the content.

A

http –body GET https://example.com > http-messages-recap/index.html

Make sure you type in the file-path where you want the new index.html to be made.

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

How to see both response and request status of an http-request.

A

–v

http –v GET https://example.com

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

Difference between internet and web.

A

Internet is computers on a network. IP Address

Web is http messages. You can put a link in one document to go to another document.

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