summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSmokowski, Kevin (ks6305) <kevin.smokowski@att.com>2019-04-02 13:38:06 +0000
committerSmokowski, Kevin (ks6305) <kevin.smokowski@att.com>2019-04-02 13:38:06 +0000
commitf360b7b2bc9ed8d321dade9cadafe2ebda4f46ab (patch)
tree9df2736e5c05aaf46c0bc1d44e7722a54c46c850
parent8f3b67cdcf11d2fb661da98a22d9d532eb13e809 (diff)
RestApiCallNode HTTP method patch not working
RestApiCallNode patch not working after upgrading from sun jersey to glassfish, apply workaround Change-Id: I3a36b9c0c8b241b46059edec08fb80087e67fd93 Issue-ID: CCSDK-1191 Signed-off-by: Smokowski, Kevin (ks6305) <kevin.smokowski@att.com>
-rw-r--r--restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java3
1 files changed, 3 insertions, 0 deletions
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 4c04c9d3b..521c66cb3 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
@@ -58,6 +58,7 @@ import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriBuilder;
import org.apache.commons.lang3.StringUtils;
import org.glassfish.jersey.client.ClientProperties;
+import org.glassfish.jersey.client.HttpUrlConnectorProvider;
import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature;
import org.glassfish.jersey.client.oauth1.ConsumerCredentials;
import org.glassfish.jersey.client.oauth1.OAuth1ClientSupport;
@@ -622,6 +623,8 @@ public class RestapiCallNode implements SvcLogicJavaPlugin {
.build();
}
client.property(ClientProperties.CONNECT_TIMEOUT, 5000);
+ // Needed to support additional HTTP methods such as PATCH
+ client.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true);
WebTarget webTarget = addAuthType(client, p).target(p.restapiUrl);