import java.net.URL;
import java.util.Collection;
-import javax.net.ssl.HttpsURLConnection;
+import java.net.HttpURLConnection;
import org.eclipse.jdt.annotation.Nullable;
import android.content.Context;
*/
/**
- * ExecutableRunnable that makes a HTTPS call to the server and hands the response to a callback
+ * ExecutableRunnable that makes a HTTP(S) call to the server and hands the response to a callback
*
* @author Marius Gavrilescu <marius@ieval.ro>
*/
*
* @author Marius Gavrilescu
*/
- public static interface ResultCallback{
+ public interface ResultCallback{
/**
* Callback invoked if the HTTP call is successful.
*
* @param responseMessage HTTP response message
* @param inputStream HTTP content InputStream
*/
- public void onResult(final int responseCode, final String responseMessage, final InputStream inputStream);
+ void onResult(final int responseCode, final String responseMessage, final InputStream inputStream);
/**
* Callback invoked if the HTTP call is unsuccessful.
*
* @param error localized error message
*/
- public void onError(final String error);
+ void onError(final String error);
}
/**
public void run() {
try {
final URL url=Utils.getServerURL(toNonNull(context),toNonNull(path));
- final HttpsURLConnection conn=(HttpsURLConnection) url.openConnection();
+ final HttpURLConnection conn=(HttpURLConnection) url.openConnection();
if(data!=null){
conn.setDoOutput(true);
conn.setFixedLengthStreamingMode(data.length);