response = builder.delete(ClientResponse.class, serialize(body));
} else {
response = builder.type(contentType).delete(ClientResponse.class, serialize(body));
}
} else {
throw new ApiException(500, "unknown method type " + method);
}
if (response.getClientResponseStatus() == ClientResponse.Status.NO_CONTENT) {
return null;
} else if (response.getClientResponseStatus().getFamily() == Family.SUCCESSFUL) {
return (String) response.getEntity(String.class);
} else {
throw new ApiException(
response.getClientResponseStatus().getStatusCode(),
response.getEntity(String.class));
}
}