Skip to content

Instantly share code, notes, and snippets.

@yrezgui
Last active August 29, 2015 14:15
Show Gist options
  • Select an option

  • Save yrezgui/cdb507c4537beb0fa1aa to your computer and use it in GitHub Desktop.

Select an option

Save yrezgui/cdb507c4537beb0fa1aa to your computer and use it in GitHub Desktop.
// First version
async function main() {
var result1 = await request( "http://some.url.1" );
var data = JSON.parse( result1 );
var result2 = await request( "http://some.url.2?id=" + data.id );
var resp = JSON.parse( result2 );
console.log( "The value you asked for: " + resp.value );
}
main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment