async function fetchData() {
const url = 'https://fondsfinder.universal-investment.com/api/v0/country/de/language/en/fund/DE000A3ERMJ4';
const headers = new Headers();
headers.append('api_key', '29A74CBC-E095-EF11-AFA5-0050C3185251');
try {
const response = await fetch(url, { method: 'GET', headers });
if (!response.ok) {
throw new Error(`JavaScript request failed with status ${response.status}`);
}
const data = await response.json();
console.log('Received data:', data);
} catch (error) {
console.error('Error fetching data:', error.message);
}
}
fetchData();