From 6674db812af9fac7e7e4521b9001dd30791d341e Mon Sep 17 00:00:00 2001 From: George Vlahavas Date: Fri, 10 Dec 2021 13:52:05 +0200 Subject: [PATCH] Add application/json header --- kea_integration.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kea_integration.groovy b/kea_integration.groovy index 7b8597c..241ffcb 100644 --- a/kea_integration.groovy +++ b/kea_integration.groovy @@ -43,12 +43,12 @@ pipeline { } String processId = responseCode.split(",")[1].split(":")[1]; url = "$APP_URL/api/v1/xlsiem" - responseCode = sh(label: testName, script: "curl -m 10 -sL -w '%{http_code}' -H 'Authorization: Bearer $token' -F file=@pcap-data/mltd1-unix.json $url -o /dev/null", returnStdout: true) + responseCode = sh(label: testName, script: "curl -m 10 -sL -w '%{http_code}' -H 'Authorization: Bearer $token' -H 'Accept: application/json, text/plain, */*' -F file=@pcap-data/mltd1-unix.json $url -o /dev/null", returnStdout: true) echo responseCode if (responseCode != '200') { error("$testName: Returned status code = $responseCode when calling $url") } - responseCode = sh(label: testName, script: "curl -m 10 -sL -w '%{http_code}' -H 'Authorization: Bearer $token' -F file=@pcap-data/mltd2-unix.json $url -o /dev/null", returnStdout: true) + responseCode = sh(label: testName, script: "curl -m 10 -sL -w '%{http_code}' -H 'Authorization: Bearer $token' -H 'Accept: application/json, text/plain, */*' -F file=@pcap-data/mltd2-unix.json $url -o /dev/null", returnStdout: true) echo responseCode if (responseCode != '200') { error("$testName: Returned status code = $responseCode when calling $url") -- 2.2.2