我正在尝试使用 GitHub 存储库创建问题:
curl -d '{"title":"my-new-repo","body":"my new issue description"}' https://api.github.com/repos/np98765/BattleKits/issues
这只是返回:
{
"message": "Not Found"
}
我这样验证:
curl -u "user:password" https://api.github.com
我做错了什么? http://developer.github.com/v3/issues/#create-an-issue
最佳答案
您似乎没有在您的 curl
请求中调用 POST
。
您至少可以尝试(遵循“REST-esting with cURL”):
curl -X POST -i -d '{"title":"my-new-repo","body":"my new issue description"}' https://api.github.com/repos/np98765/BattleKits/issues
使用 -i
查看响应 header 。
关于bash - GitHub 问题创建 API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13324052/