cancel
Showing results for 
Search instead for 
Did you mean: 

How to compare previous URI in pagination in HTTP Client?

Andrei_Y
New Contributor III

I have an issue with an infinite loop in pagination. API Server returns a next URI which matches the previous URI. It can happen on any pages. For example, HTTP client fetched 10 pages but the page 10 contains the next URI which matches the previous URI. I want to stop in order to avoid an infinite loop but I don't know how get the previous URI in Pagination section. Do you have any ideas how to do it?

For example, URI request = https://hostname.com/?after=bbbb returns:

 

{
    "entity": {
      "data": [],
      "paging": {
        "next": "https://hostname.com/?after=bbbb",
        "previous": "https://hostname.com/?before=aaaa"
      }
}

 

 

 

2025-03-21_184317.jpg

0 REPLIES 0