-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Background
The Link HTTP header only includes links to different pages. It would be great to also include the total count somewhere in the response.
Potential Solution
This SO answer suggests including an X-Total-Count header in the response.
I'm happy to work on this if you don't have time to do it.
Workaround
I understand I can calculate this using the following steps but it includes an extra API call:
- Hit the
lasturl - Calculate the number of items in the
lastresponse - Perform the simple calculation:
PAGE_SIZE * (LAST_PAGE_INDEX - 1) + NUM_ITEMS_ON_LAST_PAGE
For example: If I have 25 items with a page size of 10, the calculation would be:
10 * (3 - 1) + 5 = 25
Metadata
Metadata
Assignees
Labels
No labels