HTTP Flashcards

1
Q

What is a client?

A

A client is a device or program that requests content or service from a server over a network

the client sends a request over the network and the server returns a response

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 device or program that runs one or more programs and shares their resources with the clients

receives the request and send a response

ex computer server gives you data, whether its an html page, json data, xml, images, etc.. it serves some kind of data to you

the client sends a request over the network and the server returns a response

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 request

whenever you go to a URL on a browser, it is always a GET request

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

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

A

HTTP method, request target, HTTP version

request target is usually a URL or absolute path

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

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

A

protocol version, status code, status text

status text - a brief info of the status code to help a human understand the HTTP message

common status codes are 200, 400, 302

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

What are HTTP headers?

A

a place to store additional information about the request and/or response

HTTP headers let the client and the server pass additional information with an HTTP request or response

they are key value pairs

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 message?

A

no

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

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

A

IANA registry

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