In the Pre-request script, is it possible to add a Bearer Style authentication in the pm.sendRequest function? If so, what does the syntax look like?
pm.sendRequest({
url: "URL of some type",
method: 'POST',
auth: {
type:'bearer',
token: 'Bearer Token'
}
header: {
'Content-Type': 'application/xml'
},
body: {
mode: 'raw',
raw: `Body Data of some type`
}
}, function (err, res) {
if(err) {
throw new Error(err);
} else {
console.log("auth was successful")
}
});