Curl by default adds headers such as Content-type and User-agent. Normally that is a good thing but I'm trying to test what our server does when those headers are missing.
My problem is with the Content-type header. If it is missing, the server correctly assumes the user sent JSON. However, curl actually adds the missing header and incorrectly assumes that the content I am posting application/x-www-form-urlencoded. It also sends an Accept header of */*.
I suppose that is nice default behavior but I basically would like it to not send headers I did not specify. Is there an option for that?
curl -v -X POST 'https://example.com' -d '{...}'
> User-Agent: curl/7.37.1
> Host: example.com
> Accept: */*
> Content-Length: 299
> Content-Type: application/x-www-form-urlencoded