我的代码如下
curl -XPOST "http://localhost:9200/test/p
ost/_bulk/" -d @City_collection.json
错误:{“error”:“Content-Type标头[application / x-www-form-urlencoded]不支持ed”,“status”:406}
您需要像这样指定内容类型标头
curl -XPOST "http://localhost:9200/test/post/_bulk/" -H "Content-Type: application/json" -d @City_collection.json
^
|
add this