diff options
author | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-03-28 14:42:53 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-03-28 14:43:16 -0400 |
commit | 3225f51c16843cc9de7a485ad37d37d9cbd4f973 (patch) | |
tree | 1acdb3a1e533ff82c7aefbf37aca7ef6bd653ee3 /common/src/main | |
parent | 6ab58d3a85a31badcd1f1f4ace5c37d7a4ba7e96 (diff) |
delete with payload does not work
corrected wiremock stub after client delete change
changed the method used to create a delete with payload
Change-Id: I3cbda716af30e0d2954b42a4ac965e53b4897924
Issue-ID: SO-1712
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
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())); |