Using Promise.all with Async/Await to get data from multiple endpoints
Sometimes you want to get some data from several different API endpoints. In this example I will be using the Star Wars API to get information about some characters. See below.
const urls = [
"https://swapi.co/api/people/1",
"https://swapi.co/api...
davidbell.hashnode.dev4 min read
Braydon Coyer
Sr Front End Developer, DOM Artist. https://braydoncoyer.dev/
Really enjoyed this one and appreciate how you’ve explained it. It’s surprising how many developers chain one API call after another instead of using Promise.all(). Thanks for sharing!