From 67ef2af341cbe8530437f67bbffdc7721f4e5587 Mon Sep 17 00:00:00 2001 From: GuangrongFu Date: Fri, 31 Aug 2018 08:51:17 +0800 Subject: Fixed HTTP PATCH Failures Change-Id: I0f71aeb78e31e0b66fea0d6c3bb941ef702277e5 Issue-ID: HOLMES-160 Signed-off-by: GuangrongFu --- .../src/main/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'holmes-actions/src/main/java/org') 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 75b1bfc..0e444c1 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 @@ -28,6 +28,7 @@ import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.MultivaluedHashMap; import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.Response; +import org.glassfish.jersey.client.HttpUrlConnectorProvider; import java.util.HashMap; import java.util.Map; import java.util.regex.Matcher; @@ -237,7 +238,8 @@ public class AaiQuery4Ccvpn { private Response patch(String host, String path, Map body) { Client client = ClientBuilder.newClient(); WebTarget target = client.target(host).path(path); - return target.request().headers(getAaiHeaders()).method("PATCH", Entity.json(body)); + return target.request().headers(getAaiHeaders()).build("PATCH", Entity.json(body)) + .property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true).invoke(); } private JSONObject getInfo(String response, String pField, String field) { -- cgit 1.2.3-korg