asynchronous

tiktok bookmarks

Making Many HTTP Requests Using Recursion

One of the most important functions for my TikTok bookmark app is the ability to import an entire list of liked videos. During the process of testing files for liked videos, I realized that longer lists (with thousands of videos) struggled to import all files in one attempt. After examining 150 videos or so, I started receiving error messages about the connect timing out. I fiddled with the asynchronous code I created (and upgraded the for loop I was using to an ES6 for...of loop in the process), but I continued to see the same error messages after a minute or so of processing HTTP get requests.

Read