الملفات
ScanDrone/test-api.js
2025-10-28 22:04:46 +03:00

16 أسطر
462 B
JavaScript

// Simple test script to check if the API endpoint is working
fetch('http://localhost:3001/api/contact', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'Test User',
email: 'test@example.com',
phone: '1234567890',
message: 'This is a test message'
}),
})
.then(response => response.json())
.then(data => console.log('Success:', data))
.catch(error => console.error('Error:', error));