LmOtaku
0
Q:

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);
  });
});

0

New to Communities?

Join the community