This repository has been archived on 2026-02-01. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
siri-shortcuts/test-request.js
Riccardo Senica 7d1ef8a7e5
Some checks failed
Deploy / lint-build-deploy (push) Failing after 57s
feat: use llama
2026-02-01 13:03:51 +01:00

21 lines
453 B
JavaScript

require('dotenv').config();
const fetch = require('axios');
async function testAPI() {
try {
const response = await fetch.post('http://localhost:3000/api/shortcut', {
command: 'llama',
parameters: {
question: 'What is 42?'
},
apiKey: process.env.USER_KEY
});
console.log('Success:', response.data);
} catch (error) {
console.error('Error:', error.response?.data || error.message);
}
}
testAPI();