I make POST requests in my application and somtimes (if i have a huge amount of Post data), the following error occured:
avax.net.ssl.SSLException: Wr
I've had the same problem using the DefaultHttpClient, well, using my own implementation of the httpclient to support https. Small files it was working fine and big files were failing time after time.
After reading this response I've changed to the HttpsURLConnection like the accepted answer suggests and also because it is recommended by android (http://android-developers.blogspot.pt/2011/09/androids-http-clients.html).
The problem stood. Turns out the issue was on the server, I've changed the configs from the PHP server before to accept bigger sizes, but I totally forgot to change the client_max_body_size
of the nginx. After making that small change sending big files was working. Through both HttpsUrlConnections and DefaultHttpClient.