diff options
author | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2018-09-28 10:28:53 +0530 |
---|---|---|
committer | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2018-09-28 10:28:53 +0530 |
commit | e1090cd34b728891a6e4aa91ebebcade00561048 (patch) | |
tree | cf44c39c8ae0515c8f73f851c37a1fc254b0fbc0 /profiles | |
parent | 9b879734d46b1c83fbc9f411b31290a4d4d13566 (diff) |
HTTP: Add PATCH support
Issue-ID: CLI-122
Change-Id: Ide3cdf55c726b45a3d410f06529b26507e6cb9a9
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'profiles')
-rw-r--r-- | profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java | 5 |
1 files changed, 5 insertions, 0 deletions
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())) { |