title: Can I set Content-Type via curl on command-line without adding "boundary=------"?
body: <p>I am sending a command-line curl command to a webserver.  The webserver only accepts content of type application/xml or application/json.  My curl command (slightly edited) is:</p>
  
  <pre><code>curl -k  --cert certfile --form "fileupload=@test.xml" --cacert cacert.pem https://IP:PORT/v1/all/3131 --header "allowed-domains: foo.net" -H "Content-Type:application/xml"
  </code></pre>
  
  <p>I'm finding that the server rejects this with the following:</p>
  
  <pre><code>POST load request has invalid type application/xml; boundary=----------------------------dc1435dd0d36
  </code></pre>
  
  <p>The problem is that the server doesn't recognize</p>
  
  <pre><code>"boundary=----------------------------dc1435dd0d36"
  </code></pre>
  
  <p>Is there a way to tell curl not to include that?  Or is this a bug in the server?</p>
  
  <p>I found a related question on SO about this, but it only addressed programs that can set curl options via curl_setopt.  Is there a way to do these things on the command line?  That earlier question was:</p>
  
  <p><a href="https://stackoverflow.com/questions/9152165/php-curl-content-length-und-content-type-wrong">PHP cURL Content-Length and Content-Type wrong</a></p>
  
  <p>Thanks in advance for any help!</p>