const https = require('https'); // Test som frontend ville gøre - kald API endpoint const testAPI = () => { const options = { hostname: 'tilbudsgiveren.alw.dk', port: 443, path: '/api/quotes/openai/stats', method: 'GET', headers: { 'User-Agent': 'Mozilla/5.0 (Test Browser)', 'Accept': 'application/json', 'Referer': 'https://tilbudsgiveren.alw.dk/' } }; const req = https.request(options, (res) => { console.log(`Status: ${res.statusCode}`); console.log(`Headers:`, res.headers); let data = ''; res.on('data', (chunk) => { data += chunk; }); res.on('end', () => { try { const json = JSON.parse(data); console.log('API Response:', json); } catch (e) { console.log('Response data:', data); } }); }); req.on('error', (e) => { console.error('Error:', e.message); }); req.end(); }; testAPI();