fetch('/api/endpoints/licenses.php', { credentials: 'include' }) .then(res => res.json()) .then(data => { out.textContent = JSON.stringify(data, null, 2); });