summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn.java4
-rw-r--r--holmes-actions/src/test/java/org/onap/holmes/common/aai/AaiQuery4CcvpnTest.java1
2 files changed, 3 insertions, 2 deletions
diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn.java b/holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn.java
index de3cbf9..3e056d5 100644
--- a/holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn.java
+++ b/holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn.java
@@ -14,7 +14,6 @@
package org.onap.holmes.common.aai;
-
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.onap.holmes.common.aai.config.AaiConfig;
@@ -50,6 +49,7 @@ public class AaiQuery4Ccvpn {
headers.add("X-FromAppId", AaiConfig.X_FROMAPP_ID);
headers.add("Authorization", AaiConfig.getAuthenticationCredentials());
headers.add("Accept", "application/json");
+ headers.add("Content-Type", "application/json");
}
/**
@@ -220,7 +220,7 @@ public class AaiQuery4Ccvpn {
Response response = target.request().headers(getAaiHeaders()).build("PATCH", Entity.json(body))
.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true).invoke();
if (response.getStatusInfo().getFamily() != Response.Status.Family.SUCCESSFUL) {
- throw new CorrelationException("Failed to connecto to AAI. \nCause: "
+ throw new CorrelationException("Failed to connect to AAI. \nCause: "
+ response.getStatusInfo().getReasonPhrase() + "\nDetails: \n"
+ getErrorMsg(String.format("%s%s", host, path), body, response));
}
diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/aai/AaiQuery4CcvpnTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/aai/AaiQuery4CcvpnTest.java
index 51c3444..52593aa 100644
--- a/holmes-actions/src/test/java/org/onap/holmes/common/aai/AaiQuery4CcvpnTest.java
+++ b/holmes-actions/src/test/java/org/onap/holmes/common/aai/AaiQuery4CcvpnTest.java
@@ -90,6 +90,7 @@ public class AaiQuery4CcvpnTest {
headers.add("X-FromAppId", AaiConfig.X_FROMAPP_ID);
headers.add("Authorization", AaiConfig.getAuthenticationCredentials());
headers.add("Accept", "application/json");
+ headers.add("Content-Type", "application/json");
Whitebox.setInternalState(aai, "headers", headers);
}