Created
June 10, 2017 18:40
-
-
Save patarkf/b9cd718da06a7db4211ae20ce0fb9410 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function makeRequest() { | |
const response = await fetch('foo'); | |
if (response.doestItNeedAnotherRequest) { | |
const secondResponse = await makeAnotherRequest(response); | |
console.log(secondResponse); | |
return secondResponse; | |
} | |
console.log(response); | |
return response; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment