标签:user encode ast json ref url ror index request
问题描述curl -XPOST 192.168.14.173:32000/test_index_1221/test_type/5 -d ‘{‘user_name‘:"xiaoming"}‘
{"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406}
官方解释: https://www.elastic.co/cn/blog/strict-content-type-checking-for-elasticsearch-rest-requests
解决方法
curl -H "Content-Type: application/json" -XPOST 192.168.14.173:32000/test_index_1221/test_type/5 -d ‘{‘user_name‘:"xiaoming"}‘
{"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406}
指定head头
elasticsearch6.x {"error":"Content-Type header [ap
标签:user encode ast json ref url ror index request
原文地址:http://blog.51cto.com/461205160/2318702