https Flashcards

1
Q

What is a client?

A

part of client-server model

clients are service requestors from providers which are servers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a server?

A

part of client-server model

provides service / resources to requestors which are clients

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which HTTP method does a browser issue to a web server when you visit a URL?

A

GET ?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What three things are on the start-line of an HTTP request message?

A

http method

request target

http version

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What three things are on the start-line of an HTTP response message?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are HTTP headers?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Is a body required for a valid HTTP request or response message?

A

no

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what is ajax?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does the AJAX acronym stand for?

A

Asynchronous JavaScript And XML

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which object is built into the browser for making HTTP requests in JavaScript?

A

XMLHttpRequest

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What event is fired by XMLHttpRequest objects when they are finished loading the data from the server?

A

load

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

An XMLHttpRequest object has an addEventListener() method just like DOM elements. How is it possible that they both share this functionality?

A

share the same prototype –> EventTarget

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Which HTTP method does a browser issue to a web server when you visit a URL?

A

get

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is on the first line of an HTTP request message?

What is on the first line of an HTTP response message?

A

request:

method call/ path / http version –> GET /api/grades/ HTTP/1.1

response:

http version / status code / status text –> HTTP/1.1 200 OK

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does fetch() return?

A

response object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the default request method used by fetch()?

A

GET

17
Q

How do you specify the request method (GET, POST, etc.) when calling fetch?

A

through an object as a second argument