java.lang.IllegalStateException: Already Connected Exception
843841Dec 13 2007 — edited Dec 14 2007I get java.lang.IllegalStateException: Already Connected Exception while executing
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST");
(Exception here) conn.setDoOutput(true); // we want to send things
// the Content-type should be default, but we set it anyway
conn.setRequestProperty( "Content-type", "application/x-www-form-urlencoded" );
// the content-length should not be necessary, but we're cautious
conn.setRequestProperty( "Content-length", Integer.toString(body.length()));
Can any one please let me know how to get this thing fixed