问答详情
源自:-

"status": 406 Content-Type header [text/plain] is not supported

创建索引报错

请求方式: put

{  
  "title": "My first blog entry",  
  "text":  "Just trying this out...",  
  "date":  "2014/01/01"  


返回值

{
    "error": "Content-Type header [text/plain] is not supported",
    "status": 406
}


提问者:王飞0123 2018-01-19 11:15

个回答

  • CorningSun
    2018-03-06 10:47:22

    header 设置错了,应该是 application/json

    如果是用 postman 的话,可以进入Body,然后选择 raw JSON(application/json)格式

    http://img2.mukewang.com/5a9e012900019e0106390250.jpg