From 47d5bfc7f5acf4967c53bbd6b1755842118f1312 Mon Sep 17 00:00:00 2001 From: Kanagaraj M Date: Fri, 12 Apr 2019 16:26:09 +0530 Subject: Fix DELETE with body fails Issue-ID: CLI-154 Change-Id: I1228d3ddff11c2eabb3fd0acc40e0063afcfd09b Signed-off-by: Kanagaraj Manickam k00365106 --- .../main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'profiles/http') 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 186383d9..5b85ca9a 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 @@ -312,7 +312,7 @@ public class OnapHttpConnection { } else if ("delete".equals(input.getMethod())) { if (!input.getBody().isEmpty()) { HttpDeleteWithBody httpDelete = new HttpDeleteWithBody(); - httpDelete.setEntity(this.getStringEntity(input)); + httpDelete.setEntity(new StringEntity(input.getBody(), ContentType.APPLICATION_JSON)); requestBase = httpDelete; } else { requestBase = new HttpDelete(); @@ -401,7 +401,7 @@ public class OnapHttpConnection { } public String getMethod() { - return OnapCommandHttpConstants.DELETE; + return OnapCommandHttpConstants.DELETE.toUpperCase(); } } -- cgit 1.2.3-korg