HTTP 406不可接受响应头fiddler

问题描述 投票:0回答:1

我使用qazxsw poi作为qazxsw poi的前端服务。

我正在尝试使用fiddler 4之后的API将文档存储到索引中。

这是我的样本json作为请求体:

elasticsearch

API:this方法:{ "fruit": "Apple", "size": "Large", "color": "Red" }

这是回复:

http://localhost:9200/food/fruit

json http elasticsearch fiddler http-status-code-406
1个回答
0
投票

正如他们在POST HTTP/1.1中所提到的,“从Elasticsearch 6.0开始,包含正文的所有REST请求也必须为该正文提供正确的内容类型。”在请求中添加enter image description here解决了这个问题。

doc.

© www.soinside.com 2019 - 2024. All rights reserved.