com.sola.instagram.io.DeleteMethod Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of instagram-java Show documentation
Show all versions of instagram-java Show documentation
Java wrapper for Instagram API v1.
package com.sola.instagram.io;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.HttpResponse;
import java.io.InputStream;
public class DeleteMethod extends APIMethod {
DefaultHttpClient client;
public DeleteMethod() {
super();
this.type = "GET";
this.client = new DefaultHttpClient();
}
public DeleteMethod(String proxyAddress, int proxyPort) {
super(proxyAddress, proxyPort);
this.type = "GET";
this.client = new DefaultHttpClient();
}
@Override
protected InputStream performRequest() throws Exception {
HttpResponse response;
HttpDelete delete = new HttpDelete(this.methodUri);
InputStream stream = null;
response = client.execute(delete);
stream = response.getEntity().getContent();
return stream;
}
}