/*---------------------------------------------------------------------------------------
Enumerate available printers */
let basePrintPortalURL = "https://example.com/Bartender/api/v1/";
let printPortalPrinters = "printers/";
let token = "token_value_from_authentication_call";
fetch(basePrintPortalURL + printPortalPrinters, {
method: 'get',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + token
},
})
.then(response => response.json())
.then(result => {
console.log('Success:', result);
})
.catch(error => {
console.error('Error:', error);
});