HTTP Messages Flashcards

1
Q

What is a client?

A

program or device that requests data or service

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

What is a server?

A

program or device that receives requests and provides of data 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

HTTP GET request

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

What are the formats of HTTP Requests and Responses?

A
  1. start-line - describes the requests to be implemented (or its status of whether successful or failure)
  2. optional set of HTTP headers specifying request (or describing body including in the message)
  3. blank line to indicate that all meta-info for request has been sent
  4. optional body containing data associated with the request (or the document associated with a response
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 request message?

A

A single start-line describing the requests to be implemented.

  • HTTP method, verb (GET, PUT, POST) or noun (HEAD, OPTIONS) describes the action to be performed
  • request target (URL) or absolute path
  • HTTP version
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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

A

Its status of whether successful or a failure. This start-line is always a single line.

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

What are HTTP headers?

A

They specify the request, or describe the body included in the message.
- Metadata about requests and responses

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

A

Optional

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