X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=restapi-call-node%2Fprovider%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fccsdk%2Fsli%2Fplugins%2Frestapicall%2FRestapiCallNode.java;h=ea2d259b78e38fe08fc4064eadeb22f8bca73d89;hb=09031e372568052390f514ad37efa919299153a4;hp=e5c1859686a3fc6a41b5dcd3817d381237fe0762;hpb=c6029168cd1b95ef2c4a2b554fd0f3b61df185da;p=ccsdk%2Fsli%2Fplugins.git 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 e5c18596..ea2d259b 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 @@ -437,7 +437,7 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { Client client = Client.create(config); client.setConnectTimeout(5000); - if (p.restapiUser != null) + if (p.restapiUser != null && p.restapiPassword != null) client.addFilter(new HTTPBasicAuthFilter(p.restapiUser, p.restapiPassword)); WebResource webResource = client.resource(p.restapiUrl); @@ -457,6 +457,9 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { } WebResource.Builder webResourceBuilder = webResource.accept(tt).type(tt1); + if(p.format == Format.NONE){ + webResourceBuilder = webResource.header("",""); + } if (p.customHttpHeaders != null && p.customHttpHeaders.length() > 0) { String[] keyValuePairs = p.customHttpHeaders.split(",");