From e1090cd34b728891a6e4aa91ebebcade00561048 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Fri, 28 Sep 2018 10:28:53 +0530 Subject: HTTP: Add PATCH support Issue-ID: CLI-122 Change-Id: Ide3cdf55c726b45a3d410f06529b26507e6cb9a9 Signed-off-by: Kanagaraj Manickam k00365106 --- .../main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'profiles/http/src/main/java/org') 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())) { -- cgit 1.2.3-korg