Created
December 11, 2014 15:09
-
-
Save lennym/cfedcfa63ba8a33b3d00 to your computer and use it in GitHub Desktop.
HTTPS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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