public RESPONSE delete(WebResource resource, MultivaluedMapImpl data) throws IOException {
    LOG.info("DELETE {}", resource.toString());

    StringBuilder curlBuilder = new StringBuilder();

    UriBuilder builder = getUriBuilder(data, curlBuilder);

    Map<String, String> headers = new HashMap<String, String>();
    headers.put("Content-Type", "application/x-www-form-urlencoded");

    recordLastCurlCommand(String.format("curl -X DELETE " + curlBuilder.toString() + " \"" + resource.toString() + "\""));

    InputStream inputStream = readFrom(resource, "DELETE", builder.build().getRawQuery(), headers);
    String responseJson = IOUtils.toString(inputStream);

    LOG.debug("RESPONSE => {}", responseJson);
    return gson.fromJson(responseJson, responseClass);
  }
Main implementation of DELETE request
@param resource resource
@param data delete body
@return unmarshalled response data
contrib/views/pig/src/main/java/org/apache/ambari/view/pig/templeton/client/JSONRequest.java