Properly setting a minimum delay when fetching data from external api
hi all. i'm trying to use the scryfall api, and they've got a requirement to allow at least 50-100ms of delay between each request to their api.
how would i go about properly implementing that?
i tried throwing the "whole" thing in a
i realize the placeholder
any insights/comments are greatly appreciated :JinxHeart:
how would i go about properly implementing that?
i tried throwing the "whole" thing in a
setTimeout() but that doesn't work as i'd expect, as it doesn't actually wait out the timeout and just returns undefined instantly.i realize the placeholder
post router, has something similar but i'm worried it won't actually delay the fetch call like required.any insights/comments are greatly appreciated :JinxHeart:
Solution
Adding this, will delay whatever is happening by 150ms.
May I ask why do you want to fetch data more than 10 times a second?