hubkit
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "hubkit", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"homepage": "https://github.com/pkaminski/hubkit", | ||
@@ -5,0 +5,0 @@ "authors": [ |
@@ -301,3 +301,3 @@ if (typeof require !== 'undefined') { | ||
} | ||
} else if (options.media === 'raw' && /^text\/plain *;?/.test(res.headers['content-type'])) { | ||
} else if (options.media === 'raw' && !/^text\/plain *;?/.test(res.headers['content-type'])) { | ||
// retry if github disregards 'raw' | ||
@@ -541,7 +541,3 @@ handleError(new Error( | ||
if (options.token) { | ||
if (!isNode && (options.method === 'GET' || options.method === 'HEAD')) { | ||
config.params['access_token'] = options.token; | ||
} else { | ||
config.headers['Authorization'] = 'token ' + options.token; | ||
} | ||
config.headers['Authorization'] = 'token ' + options.token; | ||
} else if (options.username && options.password) { | ||
@@ -548,0 +544,0 @@ config.auth = { |
{ | ||
"name": "hubkit", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "GitHub API library for JavaScript, promise-based, for both NodeJS and the browser", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
41842
736