Allow optional headers & body

This commit is contained in:
Joel Male
2020-08-26 10:41:58 +10:00
parent 5be5ae3f9a
commit d3ff660fa9
12 changed files with 22 additions and 16 deletions
+2 -2
View File
@@ -44,8 +44,8 @@ function run() {
var url, headers, body;
return __generator(this, function (_c) {
url = core.getInput('url');
headers = (_a = core.getInput('headers')) !== null && _a !== void 0 ? _a : '';
body = (_b = core.getInput('body')) !== null && _b !== void 0 ? _b : '';
headers = (_a = core.getInput('headers')) !== null && _a !== void 0 ? _a : null;
body = (_b = core.getInput('body')) !== null && _b !== void 0 ? _b : null;
core.info("Sending webhook request to " + url);
core.debug((new Date()).toTimeString());
http_1.http.make(url, headers, body)