HTTP Flashcards

1
Q

HTTP

A

Hypertext Transfer Protocol

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

What is Hypertext Transfer Protocol?

A

The mechanism through which data is requested and provided on the world wide web.

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

The information sent by the client is called the _____.

A

request

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
  1. GET:
  2. DELETE:
  3. PUT:
  4. POST:
A
  1. GET: get the specified source.
  2. DELETE: delete a resource.
  3. PUT: replace it.
  4. POST: Send information to it.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a ‘resource’?

A

may be anything that can be transferred as if it is a file.

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

Which type of programming refers to programs that run on continuous loop to divert blocking operations to different handlers?

a. Synchronous programming
b. Asynchronous programming

A

b. Asynchronous programming.

• It runs on a loop and defers blocking operations to handlers in order to maintain a running state.

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

What are the three states that an es6 promise can have?

A

Pending, Fulfilled, Rejected

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

GET /17_http.html HTTP/1.1: What does the first word, GET, stand for?

A

GET stands for the method of request.

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

GET /17_http.html HTTP/1.1: What does /17_http.html stand for?

A

/17_http.html is the path of the resource the request applies to.

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

/17_http.html: What does HTTP/1.1 stand for?

A

HTTP/1.1 indicates the version of the HTTP protocol it is using.

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

Status code that starts with 2 indicate…

A

the request has succeeded.

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

Status code that starts with 4 indicate…

A

the request has failed.

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

Promises handle ________ functions in es6 by representing values that will at some point return in the future.

A

asynchronous

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

___ method retrieves data and has no secondary effect.

A

GET

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

___ method sends data to a server to add resources.

A

POST

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

Which HTTP request method retrieves data from a resource and has no secondary effect?

A

GET

17
Q

Which of the following demonstrates a proper use of the fetch API function? Assume that ‘root’ is defined: root = ‘https://exampleapi/posts/1’.

a. fetch(root,{method:’GET’});
b. fetch().then(root).then(data = > data.json());

A

a. fetch(root,{method:’GET’});

18
Q

_______ programming refers to programs that run sequentially, from top to bottom, that may or may not encounter blocking operations that affect the run time.

A

Synchronous

19
Q

_______ programming refers to programs that run on a looped operation and divert blocking operations to handlers in order maintain the run time.

A

Asynchronous

20
Q

User interfaces and browsers implements systems based on ________ programming in order to handle the unpredictability of user events such as clicks, mouse moves, and more.

A

asynchronous

21
Q

ES6 ______ allow programs to handle asynchronous processes by representing values that will return at some point in the future.

A

promises

22
Q

_____ defines the foundation for data communication over the world wide web.

A

HTTP

23
Q

The ______ method begins to provides access in ES6 to HTTP request methods and grab data from apis by returning a promise that stands in for resulting data.

A

Fetch