27282930313233
import java.io.IOException; public final class HttpUtils { public static final int delete(final HttpClient httpClient, final String url) throws IOException { return httpClient.execute(new HttpDelete(url), new StatusCodeResponseHandler()); }
51525354555657
final HttpPut put = new HttpPut(url); if (body != null) { put.setHeader("Content-Type", Constants.APPLICATION_JSON); put.setEntity(new StringEntity(body, "UTF-8")); } return httpClient.execute(put, new StatusCodeResponseHandler()); }