Network Requests Flashcards
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?
GET
What three things are on the start-line of an HTTP request message?
The method, the request target, the version
What three things are on the start-line of an HTTP response message?
The protocol version, the status code, the status text
What are HTTP headers?
Information located at the top of a response that lets the server and client process additional information about the request
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?
Asynchronous JavaScript and XML
It is a programming practice of building dynamic webpages using XML Requests to update the DOM and HTML without needing to refresh the page
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
Bonus Question: An XMLHttpRequest object has an addEventListener() method just like DOM elements. How is it possible that they both share this functionality?
They both share the same prototype
What is a client?
Something that requests a service
What is a server?
A service provider program