Fetch API Flashcards

1
Q

What is a Fetch API?

A

An interface for fetching resources.

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

What does fetch return

A

promises

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

What does Fetch make things easier?

A

It makes it easier to make web requests and handle responses.

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

Fetch makes it easier to make web requests and handle responses than with the older __________.

A

XMLHttpRequest

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

What is the one mandatory argument, the fetch() method takes?

A

The path to the resource you want to fetch.

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

A fetch() method returns a _______ that resolves to the _____ to that request, whether it is successful or not.

A

Promise, Response

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

fetch()

A

The fetch() method used to fetch a resource

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

Headers

A

Represents response/request headers, allowing you to query them and take different actions depending on the results.

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

Request

A

Represents a resource request

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

Response

A

Represents the response to a request

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

Body

A

Provides methods relating to the body of the response/request, allowing you to declare what its content type is and how it should be handled.

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