Difference between curl -d `data` and curl -d @file

I would like to convert my configuration files for ElasticSearch from
JSON to YML.

I am using curl for all REST related opertions overhanding the file via

$ curl -X PUT http://localhost:9200/newindex -d @file.yml

While this is working for JSON files it is not working for YML
configuration files. In the first moment I thought it is because of
Content-Type: application/x-www-form-urlencoded implied by -d. But
surprisingly the following statement works:

$ curl -X PUT http://localhost:9200/newindex -d '$(cat file.yml)'

So, what do I miss?

Bye,

Oliver

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.