diff --git a/http-push.js b/http-push.js index 4332e4d..cadf7a4 100644 --- a/http-push.js +++ b/http-push.js @@ -1,8 +1,11 @@ const http = require('@actions/http-client'); let httpc = new http.HttpClient('github-actions'); (async () => { - let res = await httpc.post('https://www.lundvall.info/templog/firmware', JSON.stringify({run_id: process.env.GITHUB_RUN_ID})); - if (res.message.statusCode != 200) { - throw new Error(`Failed to push: ${res.message.statusMessage}`); - } + let headers = { 'Content-Type': 'application/json' }; + let payload = JSON.stringify({ run_id: process.env.GITHUB_RUN_ID }); + console.log(`Pushing ${payload}`); + let res = await httpc.post('https://www.lundvall.info/templog/firmware', payload, headers); + if (res.message.statusCode != 200) { + throw new Error(`Failed to push: ${res.message.statusMessage}`); + } })(); \ No newline at end of file