diff options
author | 2018-09-03 10:12:41 +0800 | |
---|---|---|
committer | 2018-09-03 10:12:41 +0800 | |
commit | 310a77fb3e99c4057b80098d0bcec7ecda62680d (patch) | |
tree | 79a649d3453fbe497f7fce171a0e7b55c1b0626b /holmes-actions/src/main/java | |
parent | c7fd788a1cfc030e54047701b1c1f27e42a91d1c (diff) |
Fixed Headers for AAI Queries
Change-Id: If3e46912b069bcad269ef139e7ac545dae32d936
Issue-ID: HOLMES-160
Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'holmes-actions/src/main/java')
-rw-r--r-- | holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn.java | 4 |
1 files changed, 2 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)); } |