We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c60f2dc + 7c6b1d9 commit a944dcdCopy full SHA for a944dcd
github.js
@@ -19,14 +19,15 @@
19
xhr.open(method, API_URL + path);
20
xhr.onreadystatechange = function () {
21
if (this.readyState == 4) {
22
- if (this.status >= 200 && this.status < 300) {
+ if (this.status >= 200 && this.status < 300 || this.status === 304) {
23
cb(null, raw ? this.responseText : JSON.parse(this.responseText));
24
} else {
25
cb(this.status);
26
}
27
28
29
xhr.setRequestHeader('Accept','application/vnd.github.raw');
30
+ xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
31
if (
32
(options.auth == 'oauth' && options.token) ||
33
(options.auth == 'basic' && options.username && options.password)
0 commit comments