Created
June 23, 2016 13:59
-
-
Save reganstarr/4949bb398ac543ee29daf604de568cf3 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
function apiCallFunction(){ | |
var apiUrl = ''; | |
fetch(apiUrl, { | |
method: 'GET' | |
}) | |
.then(function(res) { | |
return res.json(); | |
}) | |
.then(function(body) { | |
// do something | |
callback(null, {}); // By using {} here, we aren't defining the 'output' of the Code step yet so we can make multiple api calls | |
}) | |
.catch(callback); | |
} | |
apiCallFunction(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment