We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e91216b commit a265294Copy full SHA for a265294
lessons/03-request-response/lecture/NOTES.md
@@ -7,6 +7,8 @@ new Request('url')
7
new Response()
8
```
9
10
+## Request
11
+
12
These are the foundations of what `fetch` operates on.
13
14
```js
@@ -16,3 +18,15 @@ fetch('site.com')
16
18
const req = new Request('site.com')
17
19
fetch(req)
20
21
22
+## Response
23
24
+`fetch` returns a promise that "resolves" an instance of Response:
25
26
+https://developer.mozilla.org/en-US/docs/Web/API/fetch#return_value
27
28
+If the response contains JSON data, you can resolve that from the response object:
29
30
+```js
31
+fetch().then((res) => res.json())
32
+```
0 commit comments