Code example for HttpDelete

Methods: setHeader

        try { 
            // Create a new HttpClient and Post Header 
            HttpClient httpclient = new DefaultHttpClient();
            HttpDelete httpDelete = new HttpDelete(serviceUrl + todo.getId());
            httpDelete.setHeader("Content-type", "application/json");
            return true; 
        } catch (Exception e) {
            Log.e("", "Error post JSON-Object in RestService: " + e.getMessage());
        return false; 
     * required in order to prevent issues in earlier Android version. 
Connect your IDE to all the code out there  Get Codota for Java