HTTP Flashcards
What is a client?
The one making the request
What is a server?
Software that accepts request / and can have it do something
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?
Post/HTTP method
Request target
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?
header: a case-insensitive string followed by a colon (‘:’) and a value whose structure depends upon the header.
Head of the request / allows users to send additional information that the system might need
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 /not required
the information can be sent in the URL instead of the body
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?
onload
Bonus Question: An XMLHttpRequest object has an addEventListener() method just like DOM elements. How is it possible that they both share this functionality?
because of prototyping