Comparing version 1.1.26 to 1.1.27
@@ -9,2 +9,11 @@ /*--------------------------------------------------------- | ||
function getContents(url, token, headers, callback) { | ||
request.get(toRequestOptions(url, token, headers), function (error, response, body) { | ||
if (!error && response && response.statusCode >= 400) { | ||
error = new Error('Request returned status code: ' + response.statusCode + '\nDetails: ' + response.body); | ||
} | ||
callback(error, body); | ||
}); | ||
} | ||
exports.getContents = getContents; | ||
function toRequestOptions(url, token, headers) { | ||
headers = headers || { | ||
@@ -29,12 +38,7 @@ 'user-agent': 'nodejs' | ||
} | ||
if (process.env.npm_config_https_proxy && parsedUrl.protocol === 'https:') { | ||
else if (process.env.npm_config_https_proxy && parsedUrl.protocol === 'https:') { | ||
options.proxy = process.env.npm_config_https_proxy; | ||
} | ||
request.get(options, function (error, response, body) { | ||
if (!error && response && response.statusCode >= 400) { | ||
error = new Error('Request returned status code: ' + response.statusCode + '\nDetails: ' + response.body); | ||
} | ||
callback(error, body); | ||
}); | ||
return options; | ||
} | ||
exports.getContents = getContents; | ||
exports.toRequestOptions = toRequestOptions; |
{ | ||
"name": "vscode", | ||
"version": "1.1.26", | ||
"version": "1.1.27", | ||
"typings": "vscode.d.ts", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19128
115