From: Kanagaraj Manickam k00365106 Date: Fri, 28 Sep 2018 04:58:53 +0000 (+0530) Subject: HTTP: Add PATCH support X-Git-Tag: 2.0.4~25 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=e1090cd34b728891a6e4aa91ebebcade00561048;p=cli.git HTTP: Add PATCH support Issue-ID: CLI-122 Change-Id: Ide3cdf55c726b45a3d410f06529b26507e6cb9a9 Signed-off-by: Kanagaraj Manickam k00365106 --- diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java b/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java index aee37236..b21c2575 100644 --- a/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java +++ b/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java @@ -41,6 +41,7 @@ import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpDelete; import org.apache.http.client.methods.HttpEntityEnclosingRequestBase; import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPatch; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpPut; import org.apache.http.client.methods.HttpRequestBase; @@ -301,6 +302,10 @@ public class OnapHttpConnection { HttpPut httpPut = new HttpPut(); httpPut.setEntity(this.getStringEntity(input)); requestBase = httpPut; + } else if ("patch".equals(input.getMethod())) { + HttpPatch httpPatch = new HttpPatch(); + httpPatch.setEntity(this.getStringEntity(input)); + requestBase = httpPatch; } else if ("get".equals(input.getMethod())) { requestBase = new HttpGet(); } else if ("delete".equals(input.getMethod())) {