5 ms·
There are reasons not to return a bare array (eg they're executable JavaScript), but this one isn’t as strong IMO. It’s a tiny bit more work, one time, for clie
by eyelidlessness 4y ago
There are reasons not to return a bare array (eg they're executable JavaScript), but this one isn’t as strong IMO. It’s a tiny bit more work, one time, for clients to parse Link headers, but once done they’re an excellent way to convey pagination (and a whole lot of other neat metadata about related resources!). See, for example, GitHub’s API[1].
1: https://docs.github.com/en/rest/guides/traversing-with-pagination https://docs.github.com/en/rest/guides/traversing-with-pagin...