Last active
August 29, 2015 14:15
-
-
Save yrezgui/cdb507c4537beb0fa1aa 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
| // 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