360SDN.COM

elasticsearch6.x {error:Content-Type header application/x-www-form-urlencoded

来源:  2018-08-27 19:21:23    评论:0点击:

elasticsearch6.x {"error":"Content-Type header [application/x-www-form-urlencoded] is not supported"


问题描述

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}
  •  

官方解释:
官方改变

 解决方法

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}
  •  

指定header头即可

为您推荐

友情链接 |九搜汽车网 |手机ok生活信息网|ok生活信息网|ok微生活
 Powered by www.360SDN.COM   京ICP备11022651号-4 © 2012-2016 版权