title: Curl command for issuing a POST request
body: <p>I am in my Terminal and I want to send a <code>POST</code> request to a given URL. I have tested this with a REST client so I know that the parameters work.</p>
  
  <p>So lets say I want to POST the following parameters:</p>
  
  <ul>
  <li>username=tony</li>
  <li>password=secret</li>
  </ul>
  
  <p>To my URL: <a href="https://exmaple.com/login/">https://exmaple.com/login/</a></p>
  
  <p>I tried the following curl command in my Terminal (I am using OSX Lion)</p>
  
  <pre><code>curl --data "username=tony&amp;password=secret" http://exmaple.com/login/
  </code></pre>
  
  <p>I get an <code>500 Server Error</code> back from the server so I am now thinking of something that could be different between the REST Client and the curl command.</p>
  
  <p>Thanks for your help</p>
  
  <p><strong>Update:</strong> I am using a https service. Do I have to adjust my curl command to account for this?</p>