Get Health

const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");

const raw = JSON.stringify({
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getHealth"
});

const requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: raw,
  redirect: "follow"
};

try {
  const response = await fetch("https://api.mainnet-beta.solana.com", requestOptions);
  const result = await response.text();
  console.log(result)
} catch (error) {
  console.error(error);
};