com.sola.instagram.io.GetMethod 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 java.io.InputStream;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
public class GetMethod extends APIMethod {
public GetMethod() {
super();
this.type = "GET";
}
public GetMethod(String methodUri) {
super(methodUri);
}
@Override
protected InputStream performRequest() {
HttpResponse response;
InputStream stream = null;
HttpGet post = new HttpGet(this.methodUri);
try {
response = client.execute(post);
stream = response.getEntity().getContent();
} catch (Exception e) {
e.printStackTrace();
}
return stream;
}
}