HTTP Flashcards
What is a client?
A client is a service requester, that does not share any of its resources.
What is a server?
A server host runs one or more server programs, that is shares its resources when a client requests it.
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, HTTP request target, and HTTP version.
What three things are on the start-line of an HTTP response message?
The protocol version (usually HTTP/1.1), a status code, and a status text.
What are HTTP headers?
They are included in both requests and response. Includes a case-insensitive string followed by a colon.
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. Not all requests or responses require a body.
What does fetch() return?
A promise that resolves to a response object.
What is the default request method used by fetch()?
GET
How do you specify the request method (GET, POST, etc.) when calling fetch?
The 2nd argument is going to be an object literal with the property Method then the request method.