出于某种原因,当我尝试发布githubs api创建存储库时,我一直找不到404。这是我的代码,其他人有没有经历过?
url = "https://api.github.com/users/repo"
headers = {
"Content-type" : "application/json",
"Authorization" : "token %s" % self.config['token'],
}
request = urllib2.Request(url, json.dumps(data), headers)
try:
response = urllib2.urlopen(request).read()
# print response
except Exception, e:
print e
最佳答案
您的网址错误;是https://api.github.com/user/repos
(user
单数,repos
复数),请参见Repos create documentation。
关于python - 未找到Github API发布404,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/14448885/