Loading data from network...
const http = require('http');
const options = {
hostname: 'localhost',
port: 8787,
path: '/api/connections/discord/begin',
method: 'POST',
headers: {
'Content-Type': 'application/json',
// We don't have a valid jwt, so this might return 401. Let's just create a test token or bypass auth.
}
};
const req = http.request(options, res => {
let data = '';
res.on('data', chunk => data += chunk);
res.on('end', () => console.log('Response:', data));
});
req.on('error', e => console.log('Request error:', e.message));
req.end();