Reputation: 5235
I'm trying to fetch all Github public repositories with this GET
request: https://api.github.com/repositories
This seems to returns the first 100
repositories. The documentation says,
It's important to form calls with Link header values instead of constructing your own URLs.
https://developer.github.com/v3/#link-header
My questions is:
http-response
in Javascript fetch
Api to get the next batch of dataThe above Api seems to return the first 100 APIs and the link
in the Response Headers
for the same is something like this:
link: <https://api.github.com/repositories?since=369>; rel="next", <https://api.github.com/repositories{?since}>; rel="first"
Upvotes: 1
Views: 5543
Reputation: 261
Has this worked out for you? https://github.com/davidcelis/api-pagination/issues/92#issuecomment-360289942
You can access it via: Response.headers
response.headers.get('Link')
Upvotes: 0