Skip to content

Commit

Permalink
Add Client.delete() that takes query params
Browse files Browse the repository at this point in the history
A new Client.delete() has been added to call HTTP DELETE
operation with query params.
  • Loading branch information
edewata committed Jun 2, 2023
1 parent 8b15e37 commit 79029de
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,9 @@ public <T> T delete(String suffix, Class<T> responseType) throws Exception {
String path = getTargetPath(suffix);
return client.delete(path, responseType);
}

public <T> T delete(String suffix, Map<String, Object> params, Class<T> responseType) throws Exception {
String path = getTargetPath(suffix);
return client.delete(path, params, responseType);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,12 @@ public <T> T delete(String path, Class<T> responseType) throws Exception {
return getEntity(response, responseType);
}

public <T> T delete(String path, Map<String, Object> params, Class<T> responseType) throws Exception {
WebTarget target = target(path, params);
Response response = target.request().delete();
return getEntity(response, responseType);
}

public Info getInfo() throws Exception {
if (infoClient == null) {
infoClient = new InfoClient(this);
Expand Down

0 comments on commit 79029de

Please sign in to comment.