java.net.ProtocolException: cannot write to a URLConnection if doOutput=false - call setDoOutput(true)