我正在尝试通过此GET
请求获取所有 Github 公共存储库:https://api.github.com/repositories
这似乎返回了第一个100
存储库。文档说,
It's important to form calls with Link header values instead of constructing your own URLs.
https://developer.github.com/v3/#link-header
我的问题是:
http-response
Javascript fetch
Api的链接头来获取下一批数据上述阿比似乎返回前100个API和link
在Response Headers
为同样是这样的:link: <https://api.github.com/repositories?since=369>; rel="next", <https://api.github.com/repositories{?since}>; rel="first"
这对你有用吗?https://github.com/davidcelis/api-pagination/issues/92#issuecomment-360289942
您可以通过以下方式访问它:Response.headers
response.headers.get('Link')
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句