how do we make https request in hackerrank solution code example
Example: GET request in hackerrank
var http = require("http");
http.get('URL', (res) => {
res.setEncoding("utf8");
let body = "";
res.on("data", data => {
body += data;
});
res.on("end", () => {
body = JSON.parse(body);
console.log(body);
});
});