I’m calling a REST API which requires me to increment a ‘page’ value in order to get all the results. The issue is the API doesn’t return any metadata. For example:
1st call is: https:domain.com/object/page/1
Has next: typeof $entity == ‘array’ && $entity.length > 0
Next URL: https:domain.com/object/page/2
The problem is how to I compute the 2 (then 3,4,5… etc) Is it possible to increment a value by 1 on every subsequent call? Or is it possible to access a variable that counts how many times the call has been made?