HTTP Flashcards
What is a client?
a client initiates a request for a service from a server
What is a server?
a server listens for requests and provides a service to clients
Which HTTP method does a browser issue to a web server when you visit a URL?
GET method
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 (200, 404, 302), status text
What are HTTP headers?
they let the client and server pass additional info with 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?
no (response: GET, request: 201 Created or 404 Not Found)
What is AJAX?
a technique for loading data into part of a page 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?
HMLHttpRequest object
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?
they both have the EventTarget prototype, therefore both can use the addEventListener( ) method