Scenario:
/tasks.json
endpoint that serves all the Tasks. I can easily "paginate" the number of tasks being sent so the endpoint uses something like /tasks.json?limit=10000&page=1
but how does the client know to send this?
Is there a "standard" way to handle large requests like this and break them up naturally into chunks?
Does each client need to handle this on their end manually?
Thanks!
You should use kaminari gem. It handles all requests and paginates it. It works both on Rails Api apps and rails standard apps. https://github.com/kaminari/kaminari
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.