Java tutorial
//package com.java2s; import java.net.HttpURLConnection; import java.net.URL; public class Main { public static boolean delete(String murl) throws Exception { URL url = new URL(murl); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("DELETE"); conn.setConnectTimeout(5000); if (conn.getResponseCode() == 204) { return true; } return false; } }