我试图通过ajax调用通过github api关闭问题。我收到了404未找到的消息。
$.ajax({
url: 'https://api.github.com/repos/fakeName/some_app/issues/36?state=closed&access_token=my_key',
type: 'PUT',
contentType: "application/json; charset=utf-8",
success: function(result) {
alert("complete!");
}
});
答案 0 :(得分:0)
这有效:
$.ajax({
url: 'https://api.github.com/repos/some_name/some_app/issues/23?access_token=some_number',
type: 'PATCH',
data: '{"state": "closed" }',
contentType: "application/json; charset=utf-8",
success: function(result) {
alert(JSON.stringify(result));
}