title: How to run a curl command from java?
body: <p>I am trying to make a <em>POST</em> request from Java using curl. It also has some payload. I am getting status code 400. What am I missing?</p>
  
  <p>Following is the curl I use in terminal..</p>
  
  <pre><code>curl --cookie "token=xyzxyzxyzxyz" --header "Content-Type:application/json" --data 
  {"branchName":"name","branchId":"bid","sourceBranch":"sb","alias":"pppp","mainPackageFullPath":"main.full.path"}'
  -k http://app.aws.application/api/random/create
  </code></pre>