I am currently using something like this
HttpURLConnection con = (HttpURLConnection) u.openConnection (); con.setDoInput(true); con.setRequestMethod("POST"); con.setDoInput (true); con.setDoOutput (true); con.setRequestProperty ("Content-Type", "application/x-www-form-urlencoded"); out = new DataOutputStream(con.getOutputStream()); String content = "username=" + URLEncoder.encode ("bob") + "&password=" + URLEncoder.encode ("smith"); System.out.println("\n" + "sending form to HTTP server ..."); out.writeBytes (content); out.flush (); out.close (); con.connect();
With this, I manage to transfer some data to my server. I'm wandering now, how much can I send this way?
I want to be able to send some XML files (100 ~ 200 lines long) and would like to know if you can do this?
Jason
source share