Spaces:
Runtime error
Runtime error
| require('dotenv').config({ path: './.env' }); | |
| async function testRaw() { | |
| const url = process.env.QDRANT_URL.replace(/\/$/, ''); // remove trailing slash | |
| const key = process.env.QDRANT_API_KEY; | |
| const cleanUrl = url.replace(':6333', ''); // Try without port for Cloud | |
| console.log(`Trying: ${cleanUrl}/collections`); | |
| try { | |
| const response = await fetch(`${cleanUrl}/collections`, { | |
| method: 'GET', | |
| headers: { | |
| 'api-key': key | |
| } | |
| }); | |
| console.log(`Status: ${response.status}`); | |
| const text = await response.text(); | |
| console.log(`Body: ${text}`); | |
| } catch (e) { | |
| console.error("Fetch failed:", e); | |
| } | |
| } | |
| testRaw(); | |