-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to use Link: header instead of page/total_pages/objects keys #387
Comments
Your client should be getting those Perhaps this is a documentation bug? |
I have the same information appearing in both the headers and the JSON data for the sake of redundancy. |
Oh, it totally appears so. As far as I could see, the documentation makes no mention of |
That's also why I have issue #349. |
Maybe this is already resolved/fixed in some separate issue, but note that (perhaps only on development?) the
I am not too sure what are the current "best practices" but one would usually expect to be able to traverse the pages without having to do any manual URL juggling and just follow the
|
GET requests to endpoints returning multiple results (GET_MANY) currently use the following pagination technique:
The
page
andtotal_pages
fields, as well as the whole?page=N
URL scheme are quite specific to Flask-Restless and have to be specifically accounted for by the client. However, there exists an arguably more standard way of doing pagination in REST APIs, which is implemented e.g. by GitHub's API -- usingLink
headers in HTTP responses, e.g.:It'd be nice if F-R supported this approach as an option (to
APIManager
). Right now there exists a convoluted workaround, but it requires reparsing the JSON response inafter_request
handler and constructing the header by ourselves, which is obviously suboptimal.The text was updated successfully, but these errors were encountered: