issue with HttpURLConnection OutputStream
<p>I have the following code:</p>

<pre><code>String urlString = API_URL + "/checkins/add";  
            String inputdata = "v=20111111"+"&amp;venueId="+venueid+"&amp;broadcast="+broadcast+"&amp;oauth_token="+mAccessToken;  
            String content="";  
            try {  
                URL url = new URL( urlString );
                HttpURLConnection con = (HttpURLConnection) url.openConnection();
                con.setRequestMethod("POST");
                con.setDoOutput( true ); 
                con.connect();  

                Log.v("RESPONSE MESSAGE", con.getResponseMessage());

                OutputStreamWriter out = new OutputStreamWriter(con.getOutputStream());  
                out.write(inputdata);  
                out.flush();              
</code></pre>

<p>and I am getting an error:</p>

<pre><code>Exception: OutputStream unavailable because request headers have already been sent!
</code></pre>

<p>why is this?</p>
