Sorry, if the headline is a little dumb, it's hard to condense into one sentence.
I use axios to request a result set from an HTTP endpoint. This endpoint can only transmit 50 records at a time, but will have an unknown total number of records. Usually I just do whilemy path, increasing the "startAt" parameter and breaking out of the loop when no more results are returned.
I can't do this here, though, since I can't breakget out of the loop while in the axios callback function (which I should use to determine if I have any results).
I feel this is a βdon't see forest for treesβ problem, but can anyone suggest a better way out of this?
source
share