HTTP Flashcards
What is a client?
any tool that acts on the behalf of the user; sends request to server
What is a server?
computer system that stores web pages and responds to client requests
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?
HTTP method, request target, HTTP version
What three things are on the start-line of an HTTP response message?
protocol version, status code, status text
What are HTTP headers?
let the client and the server pass additional information with an HTTP request or response
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 does fetch() return?
returns a promise containing the response
What is the default request method used by fetch()?
GET
How do you specify the request method (GET, POST, etc.) when calling fetch?
supply second argument as an object that contains a method property and assign the desired request method as a string value