diff options
author | Steve Smokowski <ss835w@att.com> | 2019-04-01 13:18:25 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-04-01 13:18:25 +0000 |
commit | 24117e55159518d2e3599fd7cf6705d476cfda81 (patch) | |
tree | 630eaf9c925a1e2f941ed36f5470488613e6089d /common/src/main | |
parent | 5460204e37d824d363ea4557f70f5ac366ba3dcc (diff) | |
parent | 3225f51c16843cc9de7a485ad37d37d9cbd4f973 (diff) |
Merge "delete with payload does not work"
Diffstat (limited to 'common/src/main')
-rw-r--r-- | common/src/main/java/org/onap/so/client/RestRequest.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/common/src/main/java/org/onap/so/client/RestRequest.java b/common/src/main/java/org/onap/so/client/RestRequest.java index 6f0d71cabf..3864f2e5cc 100644 --- a/common/src/main/java/org/onap/so/client/RestRequest.java +++ b/common/src/main/java/org/onap/so/client/RestRequest.java @@ -25,6 +25,7 @@ package org.onap.so.client; import java.util.Optional; import java.util.concurrent.Callable; +import javax.ws.rs.HttpMethod; import javax.ws.rs.NotFoundException; import javax.ws.rs.client.Entity; import javax.ws.rs.core.Response; @@ -60,8 +61,8 @@ public class RestRequest implements Callable<Response> { response = this.client.getBuilder().accept(this.client.getAccept()).delete(); } else { - response = this.client.getBuilder().header("X-HTTP-Method-Override", "DELETE").accept(this.client.getAccept()) - .post(Entity.entity(entity, this.client.getContentType())); + response = this.client.getBuilder().accept(this.client.getAccept()) + .build(HttpMethod.DELETE, Entity.entity(entity, this.client.getContentType())).invoke(); } } else if ("PUT".equals(method)) { response = this.client.getBuilder().accept(this.client.getAccept()).put(Entity.entity(entity, this.client.getContentType())); |