Best Practices to Asynchronously Send Information to Two APIs Without Blocking?

18 Replies, 912 Views

Yo, async/await is def the way to go. In JS, I’d recommend using `axios` with async/await to asynchronously send information to two APIs. It’s super clean and easy to use.

For rate limits, I’d suggest using a library like `bottleneck` to throttle your requests. And for retries, `axios-retry` is a lifesaver—it handles exponential backoff and everything.

One thing to keep in mind: always handle errors gracefully. You don’t want your app crashing because one API call failed.

Messages In This Thread



Users browsing this thread: 1 Guest(s)