From c1fc1d4228c89547a83d15ad5b7ac17c413b2b4e Mon Sep 17 00:00:00 2001 From: paolo Date: Sat, 4 Apr 2015 10:49:46 +0200 Subject: [PATCH] eliminato codice ridondante in HTMLRequest --- .../com/example/raffaele/testapp/HTMLRequest.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/example/raffaele/testapp/HTMLRequest.java b/app/src/main/java/com/example/raffaele/testapp/HTMLRequest.java index 6cc4d6a..66aee55 100644 --- a/app/src/main/java/com/example/raffaele/testapp/HTMLRequest.java +++ b/app/src/main/java/com/example/raffaele/testapp/HTMLRequest.java @@ -9,6 +9,10 @@ import android.annotation.SuppressLint; import android.os.AsyncTask; + +import org.apache.http.HttpVersion; +import org.apache.http.params.CoreProtocolPNames; + import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.IOException; @@ -47,14 +51,6 @@ String getHTML() { e.printStackTrace(); return null; } - URLConnection connection; - try { - connection = url.openConnection(); - } catch (IOException e) { - e.printStackTrace(); - return null; - } - connection.addRequestProperty("Cookie", cookie); String urlParameters = this.parameters; byte[] postData = urlParameters.getBytes( Charset.forName( "UTF-8" ));