HTTP Flashcards
What is a client?
Requesters of a resource or service.
What is a server?
Providers of a resource or service.
Which HTTP method does a browser issue to a web server when you visit a URL?
GET
What three things are on the start-line of an HTTP request message?
- The HTTP Method(GET, PUT, POST, HEAD, OPTIONS etc.)
- The request target, usually a URL, or the absolute path of the protocol, port, and domain are usually characterized by the request context.
- The HTTP Version
What three things are on the start-line of an HTTP response message?
- The HTTP version(usually HTTP/1.1)
- Status Code, indicating success or failure of the request.
- Status text, textual description of the status code to help a human understand the HTTP message.
What are HTTP headers?
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.
Where would you go if you wanted to learn more about a specific HTTP Header?
MDN
Is a body required for a valid HTTP request or response message?
No
What is on the first line of an HTTP request message?
- The HTTP Method(GET, PUT, POST, HEAD, OPTIONS etc.)
- The request target, usually a URL, or the absolute path of the protocol, port, and domain are usually characterized by the request context.
- The HTTP Version
What is on the first line of an HTTP response message?
- The protocol version(usually HTTP/1.1)
- Status Code, indicating success or failure of the request.
- Status text, textual description of the status code to help a human understand the HTTP message.
How to GET a html body from a url and make a file with the content.
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 to see both response and request status of an http-request.
–v
http –v GET https://example.com
Difference between internet and web.
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.