I want to execute this URL:
curl -X DELETE -H "Authorization: Basic myToken=" "https://foo.com/iot/developers/apps.json?id=173217639" that deleted 1 object on the server side.
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.message.BasicHeader;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpParams;
import org.apache.http.protocol.HTTP;
HttpParams myHttpParams=new BasicHttpParams();
myHttpParams.setParameter("id", "173217639");
HttpClient client = HttpClientBuilder.create().build();
HttpGet request = new HttpGet("foo.com/iot/developers/apps.json");
request.setParams(myHttpParams);
request.addHeader("Authorization", "Basic myToken=");
HttpResponse response = client.execute(request);
But the result is not the excepted (nothing happens on the server side)