baftos wrote:actually, if you call "setDoOutput(true)", it will become a POST.
Your URLConnection is actually a HttpURLConnection. It is using GET as requestMethod, by default (see Javadoc). I am afraid that for large data, there may be a limit on how long a URL can be (not sure where, maybe in the HTTP spec, maybe in your server).
Try to use POST as requestMethod. Client code should be modified in line with the suggestions from the Google query "HttpURLConnection POST example".