Skip to content

Instantly share code, notes, and snippets.

class SimpleHttp {
async get(url) {
let response = undefined;
try{
const responseObj= await fetch(url);
const resData = await responseObj.json();
response = [ null , resData ];
}
catch(e){
response = [ e , null ];