Skip to content

Instantly share code, notes, and snippets.

@patarkf
Created June 10, 2017 18:40
Show Gist options
  • Save patarkf/b9cd718da06a7db4211ae20ce0fb9410 to your computer and use it in GitHub Desktop.
Save patarkf/b9cd718da06a7db4211ae20ce0fb9410 to your computer and use it in GitHub Desktop.
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