List of utility methods to do URL Download
String | sendPOST(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); ... |
OutputStream | connectForMultipart(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()); ... |