https Flashcards
What is a client?
part of client-server model
clients are service requestors from providers which are servers
What is a server?
part of client-server model
provides service / resources to requestors which are 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?
http method
request target
http version
What three things are on the start-line of an HTTP response message?
protocol version
A status code, indicating success or failure of the request
A status text. A brief, purely informational, textual description of the status code to help a human understand the HTTP message.
What are HTTP headers?
lets client and server pass additional info with a request or response.
additional info for body of response –> basically meta data
consists of name: value
Is a body required for a valid HTTP request or response message?
no
what is ajax?
Ajax allows you to update parts of the DOM of an HTML page without the need for a full page refresh. Ajax also lets you work asynchronously, meaning your code continues to run while the targeted part of your web page is trying to reload
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
An XMLHttpRequest object has an addEventListener() method just like DOM elements. How is it possible that they both share this functionality?
share the same prototype –> EventTarget
Which HTTP method does a browser issue to a web server when you visit a URL?
get
What is on the first line of an HTTP request message?
What is on the first line of an HTTP response message?
request:
method call/ path / http version –> GET /api/grades/ HTTP/1.1
response:
http version / status code / status text –> HTTP/1.1 200 OK
What does fetch() return?
response object