title: Sending HTTP POST Request In Java
body: <p>lets assume this URL...</p>
  
  <pre><code>http://www.example.com/page.php?id=10            
  </code></pre>
  
  <p>(Here id needs to be sent in a POST request)</p>
  
  <p>I want to send the <code>id = 10</code> to the server's <code>page.php</code>, which accepts it in a POST method.</p>
  
  <p>How can i do this from within Java?</p>
  
  <p>I tried this :</p>
  
  <pre><code>URL aaa = new URL("http://www.example.com/page.php");
  URLConnection ccc = aaa.openConnection();
  </code></pre>
  
  <p>But I still can't figure out how to send it via POST</p>