title: How to post raw body data with curl?
body: <p>Before you post this as a duplicate; I've tried many of the suggestions I found around SO.</p>
  
  <p>So far I've been using postman to post data to a Java web service. That works great as follows:</p>
  
  <p><a href="https://i.stack.imgur.com/voBZy.png" rel="noreferrer"><img src="https://i.stack.imgur.com/voBZy.png" alt="enter image description here"></a></p>
  
  <p>I now want to do the same using curl, so I tried it using the following ways:</p>
  
  <pre><code>$ curl -X POST --data "this is raw data" http://78.41.xx.xx:7778/
  $ curl -X POST --data-binary "this is raw data" http://78.41.xx.xx:7778/
  $ curl -X POST --data "@/home/kramer65/afile.txt" http://78.41.xx.xx:7778/
  $ curl -X POST --data-binary "@/home/kramer65/afile.txt" http://78.41.xx.xx:7778/
  </code></pre>
  
  <p>Unfortunately, all of those show an empty raw body on the receiving side. </p>
  
  <p>Does anybody know what I'm doing wrong here? How is my curl request different from my postman request? All tips are welcome!</p>