From: Smokowski, Kevin (ks6305) Date: Tue, 2 Apr 2019 13:38:06 +0000 (+0000) Subject: RestApiCallNode HTTP method patch not working X-Git-Tag: 0.4.2~9 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=ccsdk%2Fsli%2Fplugins.git;a=commitdiff_plain;h=f360b7b2bc9ed8d321dade9cadafe2ebda4f46ab 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) --- 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 4c04c9d3..521c66cb 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);