Forum Discussion

janwyl's avatar
janwyl
New Contributor
12 months ago

Order of reponses when using pagination with http client

Hello!

I need to fetch a large number of values from an API and retrieve them sorted. The API allows me to specify that the results are sortef and the pagination appears to be working fine. However, I have noticed that I sometimes get errors downstream because the results are in fact not sorted correctly.

I have not fully analyzed the problem but one possible theory I have is that the http client does not wait for a reply before sending the request for the next page. This would mean that a page of results could be received out of order.

Can anyone confirm whether the paginated responses to the http client are guaranteed to be in the same order as the requests?

Thanks very much!