Fix GitHub casing
This commit is contained in:
parent
b457de1e12
commit
5982afb1bd
1 changed files with 2 additions and 2 deletions
|
@ -283,14 +283,14 @@ fetch('/article/promise-chaining/user.json')
|
||||||
|
|
||||||
Now let's do something with the loaded user.
|
Now let's do something with the loaded user.
|
||||||
|
|
||||||
For instance, we can make one more request to github, load the user profile and show the avatar:
|
For instance, we can make one more request to GitHub, load the user profile and show the avatar:
|
||||||
|
|
||||||
```js run
|
```js run
|
||||||
// Make a request for user.json
|
// Make a request for user.json
|
||||||
fetch('/article/promise-chaining/user.json')
|
fetch('/article/promise-chaining/user.json')
|
||||||
// Load it as json
|
// Load it as json
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
// Make a request to github
|
// Make a request to GitHub
|
||||||
.then(user => fetch(`https://api.github.com/users/${user.name}`))
|
.then(user => fetch(`https://api.github.com/users/${user.name}`))
|
||||||
// Load the response as json
|
// Load the response as json
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue