export default class FetchData { static async getJSON(url) { const response = await fetch(url); if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } return await response.json(); } }
info at phpclasses dot org