Since your are calling https host (https://evodms-dev.clientsolve.com/evoDMSDev/api/api_event_all.php), request client will throws an error while doing SSL handshake,
thats why you got response as undefined
. Inorder to check the exact error response log the error console.error("Error Response : ", err)
Checkout this working snippet with error handling.err
Note: Now you will get Invalid Bearer Token error, Enter valid Bearer token
const request = require('request');
request({
url: 'https://evodms-dev.clientsolve.com/evoDMSDev/api/api_event_all.php',
headers: {
'Authorization': 'Bearer 71D50F9987529'
},
rejectUnauthorized: false
}, function(err, res) {
if(err) {
console.error(err);
} else {
console.log(res.body);
}
});