Skip to content Skip to sidebar Skip to footer

GET Request Returning Same Info From A Randomized Endpoint

I'm accessing the QuotesOnDesign randomized endpoint: https://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1& and for some reason I'm gettin

Solution 1:

It appears that website uses client-side code to pick some kind of a starter value (perhaps a random seed, or an ID, or a page number, or something?) to start with and includes that ID in the request (e.g. https://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&_=1564694860977).

Since you're not including that value in your request, it's apparently using a default value, and since it's the same value every time you're getting the same results every time.


Post a Comment for "GET Request Returning Same Info From A Randomized Endpoint"