Skip to content

Instantly share code, notes, and snippets.

@paulbreslin
Last active July 3, 2017 23:49
Show Gist options
  • Select an option

  • Save paulbreslin/286ad52f154cfe1a27fdf54a4d60c08d to your computer and use it in GitHub Desktop.

Select an option

Save paulbreslin/286ad52f154cfe1a27fdf54a4d60c08d to your computer and use it in GitHub Desktop.
const example = require('example-library');
const runDemo = async () => {
try {
const fistResponse = await example.firstAsyncRequest();
const secondResponse = await example.secondAsyncRequest(fistResponse);
const thirdAsyncRequest = await example.thirdAsyncRequest(secondResponse);
}
catch (error) {
// Handle error
}
};
runDemo();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment