HTTP headers could be used for pagination (and ordering) in a more RESTful way.
Standard Accept-Ranges and Range HTTP header could be used to paginate lists.
My proposal is to adopt two custom units for ranges:
units or resources for limit-offset pagination
after or continue for passing a continuation token
A custom X-Order header could be introduced to set the list order, allowing an order field to be freely filtered without name collisions. In this case the header should have the following format:
X-Order: token; ASC | DESC
HTTP headers could be used for pagination (and ordering) in a more RESTful way.
Standard
Accept-RangesandRangeHTTP header could be used to paginate lists.My proposal is to adopt two custom units for ranges:
unitsorresourcesfor limit-offset paginationafterorcontinuefor passing a continuation tokenA custom
X-Orderheader could be introduced to set the list order, allowing anorderfield to be freely filtered without name collisions. In this case the header should have the following format: