This is an old revision of the document!
{"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406}
In order to fix issue specify header with your curl XPUT.
curl -XPUT 'localhost:9200/_settings' -H 'Content-Type: application/json' -d ' { "index" : { "number_of_replicas" : 0 } }'