Skip to content

Instantly share code, notes, and snippets.

@lennym
Created December 11, 2014 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lennym/cfedcfa63ba8a33b3d00 to your computer and use it in GitHub Desktop.
Save lennym/cfedcfa63ba8a33b3d00 to your computer and use it in GitHub Desktop.
HTTPS
var https = require('https');
var getLatestCoreVersion = function(major, cb) {
var json = '';
var req = https.get({
host: 'api.github.com',
path: '/repos/mozu/core-theme/releases',
headers: {
'User-Agent': 'thmaa',
'content-length': 0,
},
rejectUnauthorized: false
}, function(res) {
res.on('data', function(chunk) {
json += chunk;
});
res.on('end', function() {
console.log(json);
});
});
}
getLatestCoreVersion();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment