how to make multiple api calls in javascript