Commit 6eb5a7c2394fbeb37888acfc2dc59002b2d152e8
1 parent
719cc43381
Exists in
master
and in
2 other branches
Send json as raw data
Showing 1 changed file with 2 additions and 2 deletions
kea_integration.groovy
View file @
6eb5a7c
... | ... | @@ -43,12 +43,12 @@ |
43 | 43 | } |
44 | 44 | String processId = responseCode.split(",")[1].split(":")[1]; |
45 | 45 | url = "$APP_URL/api/v1/xlsiem" |
46 | - responseCode = sh(label: testName, script: "curl -m 10 -sL -w '%{http_code}' -H 'Authorization: Bearer $token' -H 'Accept: application/json' -H 'Content-Type: application/json' -F file=@pcap-data/mltd1-unix.json $url -o /dev/null", returnStdout: true) | |
46 | + responseCode = sh(label: testName, script: "curl -m 10 -sL -w '%{http_code}' -H 'Authorization: Bearer $token' -H 'Accept: application/json' -H 'Content-Type: application/json' --data-raw `cat pcap-data/mltd1-unix.json` $url -o /dev/null", returnStdout: true) | |
47 | 47 | echo responseCode |
48 | 48 | if (responseCode != '200') { |
49 | 49 | error("$testName: Returned status code = $responseCode when calling $url") |
50 | 50 | } |
51 | - responseCode = sh(label: testName, script: "curl -m 10 -sL -w '%{http_code}' -H 'Authorization: Bearer $token' -H 'Accept: application/json' -H 'Content-Type: application/json'-F file=@pcap-data/mltd2-unix.json $url -o /dev/null", returnStdout: true) | |
51 | + responseCode = sh(label: testName, script: "curl -m 10 -sL -w '%{http_code}' -H 'Authorization: Bearer $token' -H 'Accept: application/json' -H 'Content-Type: application/json' --data-raw `pcap-data/mltd2-unix.json` $url -o /dev/null", returnStdout: true) | |
52 | 52 | echo responseCode |
53 | 53 | if (responseCode != '200') { |
54 | 54 | error("$testName: Returned status code = $responseCode when calling $url") |