HTTP and fetch Flashcards
What is a client?
something that requests information
What is a server?
something that provides information
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?
metadata
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 AJAX?
allows you to update parts of the DOM of an HTML page instead without the need for a full page refresh
What does the AJAX acronym stand for?
Asynchronous JavaScript and XML
Which object is built into the browser for making HTTP requests in JavaScript?
XMLHttpRequest
What event is fired by XMLHttpRequest objects when they are finished loading the data from the server?
‘load’ event
An XMLHttpRequest object has an addEventListener() method just like DOM elements. How is it possible that they both share this functionality?
prototype
What does fetch() return?
A promise that resolves to a response object
What is the default request method used by fetch()?
GET