Apologies if the title is a little obtuse, this is a hard one to condense into a single sentence.
I'm using axios to request a resultset from an HTTP endpoint. This endpoint can only deliver 50 records at a time, but will have an unknown total number of records. What I'd normally do is simply while
my way through, incrementing the "startAt" parameter, and break out of the loop when no more results are returned.
I can't do that here, though, as I cannot break
out of the loop while in the axios callback function (which I need to be using to determine whether I have any results returned).
I feel like this is a "can't see the forest for the trees" problem, but can anyone suggest the best way out of this?