Just an improved version to nkron responce.
const httpGet = url => { return new Promise((resolve, reject) => { http.get(url, res => { res.setEncoding('utf8'); const body = []; res.on('data', chunk => body.push(chunk)); res.on('end', () => resolve(body.join(''))); }).on('error', reject); });};
Appending chunks in an string[] is better for memory usage, the join(''), will allocatenew memory only once.