【问题标题】:How to create an issue on Github using Postman with Github's API?如何使用带有 github api 的 Postman 在 github 上创建问题?
【发布时间】:2020-10-17 19:04:55
【问题描述】:

我试图使用 Postman 的 GitHub API 在 GitHub 上创建问题。

即使我提供了在我的网站上生成的个人令牌,它也不起作用。

有人知道出了什么问题吗?

谢谢!

【问题讨论】:

  • 你试过不带/的网址吗?

标签: api github postman


【解决方案1】:

As documented,您的 URL https://api.github.com/repos/hanc3/testapi/issues/ 中的尾部斜杠会导致错误。

预计会是 405(不允许的方法),当在端点添加斜线会导致 API 拒绝时

在您的情况下,它是 404,这意味着您在调用该 API 时没有正确进行身份验证

仔细检查您的postman Authorization tab:它应该包含一个授权:令牌

还有headers:

Content-Type : application/json 
Authorization : token 

见“Rest API v3, Other Authentication Methods

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-08-27
    • 2022-08-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-29
    • 1970-01-01
    相关资源
    最近更新 更多