HTTP Flashcards
What is a client?
service requesters
What is a server?
the providers of a resource or service
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, and 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?
HTTP headers specify the request or describe the body included in the message.
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?
AJAX allows you to request data from a server and load it without having to refresh the page.
A way of making asynchronous computer requests.
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?
It is related to the EventTarget