如何使用GET获取存储库列表? [英] How to use GET to fetch list of repositories?

查看:104
本文介绍了如何使用GET获取存储库列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法理解下面的东西是如何工作的:我在终端中运行 GET / orgs / octokit / repos 命令并没有任何反应。 >
它应该得到存储库列表。我相信我没有做正确的方法。有人可以解释为什么这个命令不起作用吗?



示例:当您获取存储库列表时,您将获得每个存储库的摘要表示。

在这里,我们获取由octokit组织拥有的存储库列表:

  GET / orgs / octokit / repos 


解决方案

GET应该是 HTTP请求方法,而不是命令。



例如这个 curl 教程,作为通过 curl 做一些GET。

  curl https://api.github.com/orgs/octokit/repos 



这也可以直接从您的浏览器中运行: $ b

https://api.github.com/orgs/octokit/repos


I am not able to understand how the below thing works: I run the "GET /orgs/octokit/repos" command in the terminal and nothing happens.
It's supposed to get list of repositories. I am sure I am not doing the correct way. Can somebody please explain why this command doesn't work?

Example: When you get a list of repositories, you get the summary representation of each repository.
Here, we fetch the list of repositories owned by the octokit organization:

GET /orgs/octokit/repos

解决方案

GET is supposed to be an HTTP request method, not a command.

See for example this curl tutorial, as a way to do some GET through curl.

curl https://api.github.com/orgs/octokit/repos

This works also directly from your browser:

https://api.github.com/orgs/octokit/repos

这篇关于如何使用GET获取存储库列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆