In my project I have an API call, that call with give me back some ID which I am going to use later for download. Now that API request will generate a file and give me ID, which I am going do use for download in next call. Now that file wont be generated instantly, it may take some time and status of first call will be 204 if file is not ready yet.
My questions is: Is there a way for me to loop that api somehow, but not starting it again, like WHILE (status !== 204) -> dont enable download button??