Android Utililty Methods URL Download

List of utility methods to do URL Download

Description

The list of methods to do URL Download are organized into topic(s).

Method

StringsendPOST(final String myurl, final String paramns)
send POST
final URL url = new URL(myurl);
final HttpURLConnection conn = (HttpURLConnection) url
        .openConnection();
conn.setReadTimeout(10000);
conn.setConnectTimeout(15000);
conn.setRequestMethod("POST");
conn.setDoInput(true);
conn.setDoOutput(true);
...
OutputStreamconnectForMultipart(String url)
connect For Multipart
HttpURLConnection con = (HttpURLConnection) (new URL(url))
        .openConnection();
con.setRequestMethod("POST");
con.setDoInput(true);
con.setDoOutput(true);
con.setRequestProperty("Connection", "Keep-Alive");
con.setRequestProperty("Content-Type",
        "multipart/form-data; boundary=" + getBoundry());
...