From 88637cb5c4ce1b74fbd47128ce49fc90dd196473 Mon Sep 17 00:00:00 2001 From: Frank Date: Wed, 25 Mar 2020 11:23:19 +0100 Subject: [PATCH] Update dist --- dist/index.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dist/index.js b/dist/index.js index b1cb924..cea6d73 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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 } });