Files
qseow-scripts/azure-qseow/win-main.js
2021-02-14 20:59:28 -05:00

34 lines
968 B
JavaScript

// const https = require('https');
const { http, https } = require('follow-redirects');
const fs = require('fs');
const options = {
hostname: 'qseow.jprdonnelly.com',
port: 443,
path: '/main/qrs/about?xrfkey=abcdefghijklmnop',
method: 'GET',
// agent: 'Windows',
// login: 'INTERNAL\SA_API',
// password: '',
headers: {
'X-Qlik-Xrfkey' : 'abcdefghijklmnop',
'X-Qlik-User' : 'UserDirectory=INTERNAL; UserId=sa_api'
// 'X-Qlik-User' : `UserDirectory=${encodeURIComponent('INTERNAL')}; UserId=${encodeURIComponent('sa_api')}`
},
key: fs.readFileSync("client_key.pem"),
cert: fs.readFileSync("client.pem"),
ca: fs.readFileSync("root.pem"),
rejectUnauthorized: false
};
https.get(options, function(res) {
console.log("Got response: " + res.statusCode);
res.on("data", function(chunk) {
console.log("BODY: " + chunk);
});
}).on('error', function(e) {
console.log("Got error: " + e.message);
});