Response.getHttpURLConnection; EntityWriter throws IOException