HTTP Flashcards
What is a client?
a service requester.
What is a server?
something that runs a programs for a base of clients.
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?
An HTTP method, the request target, and the HTTP version
What three things are on the start-line of an HTTP response message?
the protocol version, a status code, a status text.
What are HTTP headers?
they allow the client and the server to 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. (they’re optional).
What is AJAX?
AJAX allows you to request data from a server and load it without having to refresh the entire 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?
the load event is fired when a request completes successfully.
Bonus question: An XMLHttpRequest object has an addEventListener() method just like DOM elements. How is it possible that they both share this functionality?
What is on the first line of an HTTP request message?
What is on the first line of an HTTP response message?