elasticsearch创建索引失败

具体情况如下:
-bash-4.1$ curl -XPUT http://localhost:9200/twitter/tweet/1 -d '{"user" : "kimchy", "post_date" : "2020-09-03T14:12:12", "message" : "trying out Elasticsearch"}'
{"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406}
-bash-4.1$
已邀请:

Something - 90后IT男

赞同来自:

在 curl 后加入 -H "Content-Type: application/json;charset=UTF-8"

要回复问题请先登录注册