出于某种原因,当我尝试发布 githubs api 来创建存储库时,我不断收到 404 not found。这是我的代码,有其他人经历过吗?
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