http messages Flashcards

1
Q

What is a client?

A

service requesters; initiate communication sessions with servers, which await incoming requests

i.e., typical web user’s internet-connected devices

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; share their resources with clients; abstraction

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

HTTP GET request: requests a representation of the specified resource; requests using GET should only be used to request data (they shouldn’t include data)

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. http method: describes action to be performed
  2. request target: the URL or path to get data from
  3. http version: defines the structure of message and of the requested 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
  1. protocol version: usually HTTP/1.1
  2. status code: indicating success/failure of request
  3. status text: description of the status code

above all, something like this:
HTTP/1.1 404 Not Found

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

What are HTTP headers?

A

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

a case-insensitive string followed by a colon (‘:’) and a value whose structure depends upon the header

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 or Internet Assigned Numbers Authority

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

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)

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

client-server examples

A

email, network printing, and the www

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

http messages types

A
  1. requests sent by the client to trigger an action on the server
  2. responses, the answer from the server
    ultimately: HTTP messages are the key in using HTTP
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

http requests and responses are composed of?

A
  1. start-line: the requests and the success/failure of the request (always a single line)
  2. optional: http headers: specifying requests or describing the body of included in the message
  3. blank line for all the meta-info that has been requested was sent
  4. optional: body: data associated with the request or document associated with a response
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

http acronym meaning

A

HyperText Transfer Protocol: allows the fetching of resources; defines a language for clients and servers to speak to each other.

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

http messages recap

A

….

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

What is a client?

A

service requesters

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

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

A

HTTP GET

17
Q

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

A
  1. http method: describes action to be performed
  2. request target: the URL or path to get data from
  3. http version: defines the structure of message and of the requested response
18
Q

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

A
  1. protocol version: usually HTTP/1.1
  2. status code: indicating success/failure of request
  3. status text: description of the status code

above all, something like this:
HTTP/1.1 404 Not Found

19
Q

What are HTTP headers?

A

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

a case-insensitive string followed by a colon (‘:’) and a value whose structure depends upon the header

20
Q

Is a body required for a valid HTTP message?

A

no

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)