api endpoint template: https://jsonmock.hackerrank.com/api/football_matches?competition=uefa%20champions%20league&year=<year>&page=<page_number> 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);
});
});