Hacker News new | ask | show | jobs
by eyelidlessness 1347 days 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-pagin...