async function callWeb(url) {
  let response;
  try {
    response = await fetch(url, {
      method: "GET",
    });
  } catch (err) {
    return new Response("Fetch Error: " + response.status);
  }
  responseString = await response.text();
  try {
    result = JSON.parse(responseString);
    return result;
  } catch (err) {
    result = responseString;
    return result;
  }
}
//uses fetch and GET on a Url
uses fetch and GET on a Url
uses fetch and GET on a Url
async function callWeb(url) {
  let response;
  try {
    response = await fetch(url, {
      method: "GET",
    });
  } catch (err) {
    return new Response("Fetch Error: " + response.status);
  }
  responseString = await response.text();
  try {
    result = JSON.parse(responseString);
    return result;
  } catch (err) {
    result = responseString;
    return result;
  }
}
async function callWeb ( url ) { let response ; try { response = await fetch ( url , { method : "GET" , } ) ; } catch ( err ) { return new Response ( "Fetch Error: " + response . status ) ; } responseString = await response . text ( ) ; try { result = JSON . parse ( responseString ) ; return result ; } catch ( err ) { result = responseString ; return result ; } }
uses fetch and GET on a Url
uses fetch and GET on a Url