commit
f2501bcf07
1 changed files with 1 additions and 1 deletions
|
@ -89,7 +89,7 @@ fetch('https://api.github.com/repos/javascript-tutorial/en.javascript.info/commi
|
||||||
.then(commits => alert(commits[0].author.login));
|
.then(commits => alert(commits[0].author.login));
|
||||||
```
|
```
|
||||||
|
|
||||||
To get the reponse text, `await response.text()` instead of `.json()`:
|
To get the response text, `await response.text()` instead of `.json()`:
|
||||||
|
|
||||||
```js run async
|
```js run async
|
||||||
let response = await fetch('https://api.github.com/repos/javascript-tutorial/en.javascript.info/commits');
|
let response = await fetch('https://api.github.com/repos/javascript-tutorial/en.javascript.info/commits');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue