如何从 Github 的 REST API 获得 JSON 响应?

How can I get a JSON response from Github's REST API?

我正在尝试使用 this guide to get a list of all issues from a repository. For example, let's look at the facebook/react repository

当我向 https://github.com/facebook/react/issues/ 发出 GET 请求时,它只是 returns 网页,但我想要的是包含所有问题的 JSON。

如何获得 JSON 回复?

您需要在 api 子域上使用 API 的 root endpoint

GET https://api.github.com/repos/facebook/react/issues
            ^^^^