question: public static HttpResponse executeDeleteRequest ( String serviceEndPoint , boolean secure ) throws IOException { URL url = ( secure ) ? new URL ( SERVICE_ROOT_URI + "secure/" + serviceEndPoint ) : new URL ( SERVICE_ROOT_URI + serviceEndPoint ) ; HttpURLConnection connection = ( HttpURLConnection ) url . openConnection ( ) ; try { connection . setDoInput ( true ) ; connection . setDoOutput ( true ) ; connection . setRequestProperty ( "Content-Type" , "application/atom+xml" ) ; connection . setRequestProperty ( "Accept" , "application/atom+xml" ) ; connection . setRequestMethod ( "DELETE" ) ; if ( secure ) { connection . setRequestProperty ( "Authorization" , AUTHORIZATION ) ; } connection . connect ( ) ; return new HttpResponse ( connection ) ; } finally { connection . disconnect ( ) ; } }
target:  Helper method to execute a HTTP Delete request