Code example for HttpDelete

Methods: setHeader

0
				HttpClient httpClient = new DefaultHttpClient();
							         
				String id = txtId.getText().toString();
				 
				HttpDelete del = 
						new HttpDelete("http://10.0.2.2:2731/Api/Clientes/Cliente/" + id);
				 
				del.setHeader("content-type", "application/json");
				 
				try 
		        {			 
		        	HttpResponse resp = httpClient.execute(del);
		        	String respStr = EntityUtils.toString(resp.getEntity());
		        	 
		        	if(respStr.equals("true"))
		        		lblResultado.setText("Eliminado OK.");
		        } 
		        catch(Exception ex)
		        { 
		        	Log.e("ServicioRest","Error!", ex);
Contextual code suggestions in your IDE  Get Codota for Java