Solía tener ElasticSearch 5.2, y acabo de actualizar a 6.0.
Estoy tratando de crear una plantilla de índice siguiendo la guía aquí , pero recibí un error
Content-Type header [application/x-www-form-urlencoded] is not supported
Mi consulta es
curl -X PUT localhost:9200/_template/template_1 -d '
{
  "index_patterns": ["te*", "bar*"],
  "mappings": {
    "type1": {
      "properties": {
        "host_name": {
          "type": "keyword"
        }
      }
    }
  }
}'
                
                    
                        elasticsearch
                                curl
                                mime-types
                                content-type
                                http-put
                                
                    
                    
                        Barry Leishman
fuente
                
                
            fuente

La solución es agregar
Content-Type: application/jsonencabezadofuente
En Windows, cuando asigna JSON como parámetro, use solo comillas dobles. Usa el personaje de escape.
fuente