RESTful Design: Paging Collections

后端 未结 3 802
遇见更好的自我
遇见更好的自我 2021-02-04 06:57

I am designing a REST api that needs paging (per x) enforces from the server side.

What would be the right way to page through any collection of resources:

Optio

3条回答
  •  逝去的感伤
    2021-02-04 07:59

    What the URI looks like is not the most important part. What you should be thinking about instead is how it is presented to the user. A page should for example have a link to the "next" page and another link to the "previous" page (if there is one). Take a look at RFC 5005 Feed Paging and Archiving

提交回复
热议问题