What is a client?
A service requester.
What is a server?
A service provider.
Which HTTP method does a browser issue to a web server when you visit a URL?
The GET method
All HTTP requests and responses are composed of… (4)
What three things are on the start-line of an HTTP request message?
What three things are on the start-line of an HTTP response message?
What are HTTP headers?
Headers let the client and server pass additional information within an HTTP request / 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?
Nope!
What is AJAX?
A programming practice of building complex, dynamic webages using a techonolgy known as XMLHttpRequest
What does the AJAX acronym stand for?
Asynchronous Javascript and XML
Which object is built into the browser for making HTTP requests in JS?
XMLHttpRequest Object
What event is fired by XMLHttpRequest objects when they are finished loading the data from the server?
The load event.
An XMLHttpRequest object has an addEventListener( ) method just like DOM elements. How is it possible they both share this functionality?
Via prototypical inheritance!
What does fetch( ) return?
A pwomise.
What is the default request method used by fetch( )?
GET
How do you specify the request method (GET, POST, etc.) when calling fetch?
Fetch optionally accepts a second params, an init object (usually named req) —> add the ‘method’ property with the desired method (GET, POST, etc.) as the value.