PHP Classes

File: assets/js/components/lib/FetchData.js

Recommend this page to a friend!
  Classes of Rodrigo Faustino   App MFE   assets/js/components/lib/FetchData.js   Download  
File: assets/js/components/lib/FetchData.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: App MFE
Single-page application with micro-frontends
Author: By
Last change:
Date: 1 month ago
Size: 262 bytes
 

Contents

Class file image Download
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(); } }