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:
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"
I'm finding that the server rejects this with the following:
POST load request has invalid type application/xml; boundary=----------------------------dc1435dd0d36
The problem is that the server doesn't recognize
"boundary=----------------------------dc1435dd0d36"
Is there a way to tell curl not to include that? Or is this a bug in the server?
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:
PHP cURL Content-Length and Content-Type wrong
Thanks in advance for any help!