diff options
Diffstat (limited to 'restapi-call-node/provider')
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 1eed09e90..47bb655f5 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 572b2042f..e5c185968 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); |