title: How to use the following curl post command in java?
body: <p>i have looked into different threads on stack overflow and done some research, i am unable to run this code in java after making a http connection. 
  The same command works perfectly fine in the command line</p>
  
  <pre><code>curl -X POST --header "Content-Type: application/json" --header "Accept: */*" -d "data" "http://a url"
  </code></pre>
  
  <p>I need a java code for the above curl command, i have been unable to come up with anything worthy yet</p>