Update dist

This commit is contained in:
Frank 2020-03-25 11:23:19 +01:00
parent 0170dcbc31
commit 88637cb5c4

12
dist/index.js vendored
View file

@ -2598,6 +2598,16 @@ const core = __webpack_require__(470);
const axios = __webpack_require__(53);
const auth = {}
let customHeaders = {}
if (!!core.getInput('customHeaders')) {
try {
customHeaders = JSON.parse(core.getInput('customHeaders'));
} catch(error) {
core.error('Could not parse customHeaders string value')
}
}
const headers = { 'Content-Type': core.getInput('contentType') || 'application/json' }
if (!!core.getInput('username')) {
@ -2615,7 +2625,7 @@ if (!!core.getInput('bearerToken')) {
const instance = axios.create({
baseURL: core.getInput('url', { required: true }),
timeout: parseInt(core.getInput('timeout') || 5000, 10),
headers
headers: { ...headers, ...customHeaders }
});