在curl指令后 添加 :
-H "Content-Type: application/json"
即可。
例如:
curl -H "Content-Type: application/json" -XGET 'http://localhost:9200/_count?pretty' -d '
{
"query": {
"match_all": {}
}
}
'
在curl指令后 添加 :
-H "Content-Type: application/json"
即可。
例如:
curl -H "Content-Type: application/json" -XGET 'http://localhost:9200/_count?pretty' -d '
{
"query": {
"match_all": {}
}
}
'