summaryrefslogtreecommitdiffstats
path: root/restapi-call-node/provider/src
diff options
context:
space:
mode:
Diffstat (limited to 'restapi-call-node/provider/src')
-rw-r--r--restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/Parameters.java1
-rw-r--r--restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java3
2 files changed, 4 insertions, 0 deletions
diff --git a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/Parameters.java b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/Parameters.java
index 1eed09e9..47bb655f 100644
--- a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/Parameters.java
+++ b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/Parameters.java
@@ -43,4 +43,5 @@ public class Parameters {
public String customHttpHeaders;
public String partner;
public Boolean dumpHeaders;
+ public String requestBody;
}
diff --git a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java
index 572b2042..e5c18596 100644
--- a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java
+++ b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java
@@ -131,6 +131,8 @@ public class RestapiCallNode implements SvcLogicJavaPlugin {
if (p.templateFileName != null) {
String reqTemplate = readFile(p.templateFileName);
req = buildXmlJsonRequest(ctx, reqTemplate, p.format);
+ } else if (p.requestBody != null) {
+ req = p.requestBody;
}
r = sendHttpRequest(req, p);
setResponseStatus(ctx, p.responsePrefix, r);
@@ -209,6 +211,7 @@ public class RestapiCallNode implements SvcLogicJavaPlugin {
protected Parameters getParameters(Map<String, String> paramMap) throws SvcLogicException {
Parameters p = new Parameters();
p.templateFileName = parseParam(paramMap, "templateFileName", false, null);
+ p.requestBody = parseParam(paramMap, "requestBody", false, null);
p.restapiUrl = parseParam(paramMap, "restapiUrl", true, null);
validateUrl(p.restapiUrl);
p.restapiUser = parseParam(paramMap, "restapiUser", false, null);