Code example for HttpDelete

Methods: addHeader

0
        return internalTask(request);
    } 
     
    public static String doDelete(String url) throws ClientProtocolException, IOException
    {	 
    	HttpDelete request = new HttpDelete(url);
    	request.addHeader("Accept", "application/json");
    	 
    	return internalTask(request);
    } 
  
    public static JSONObject doGet(String url)
    { 
    	JSONObject json = null;
    	 
        HttpGet request = new HttpGet(url); 
         
        request.addHeader("Accept", "application/json");
         
        String result = internalTask(request);
Experience pair programming with AI  Get Codota for Java