File size: 539 Bytes
9403f21 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
const fetch = require('node-fetch');
async function testApiKeys() {
try {
console.log('测试获取API Keys...');
const response = await fetch('http://localhost:3010/v1/api-keys');
console.log('响应状态:', response.status);
if (!response.ok) {
throw new Error(`HTTP错误: ${response.status} ${response.statusText}`);
}
const data = await response.json();
console.log('获取到的数据:', data);
} catch (error) {
console.error('测试失败:', error);
}
}
testApiKeys(); |