elasticsearch - postman 对 Elasticsearch 的 POST 请求有错误

标签 elasticsearch postman

在 elasticsearch 中迈出第一步并阅读文章
https://www.elastic.co/blog/a-practical-introduction-to-elasticsearch
我尝试在 postman 中发送请求并收到错误:

"error": "Content-Type header [multipart/form-data;boundary=--------------------------039246746046020007284747] 不受支持",
“状态”:406

我在 postman 中填写了 2 个标签:
https://imgur.com/a/yCxhOJL

https://imgur.com/a/v5VXGdu

我错过了哪些选项?

谢谢!

最佳答案

将正文作为原始 JSON 发送:

enter image description here

您选择了form-data这在 ES 中不受支持。它是 JSON 输入,JSON 输出。

关于elasticsearch - postman 对 Elasticsearch 的 POST 请求有错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61985736/

相关文章:

java - 如何为Postman的binary类型的请求体构建RestTemplate?

redirect - 如何在 postman 中访问重定向的网址?

Postman - 如何将响应 header 中的多个值存储在 var 中或只是能够看到它们

python - 将从 scrapy 中抓取的数据放入 elasticsearch 时出现 TypeError

python - 模拟 elasticsearch-py 调用

node.js - Elasticsearch 删除操作

java - 在没有证书的情况下发出 HTTPS 请求在桌面上不起作用

java - Jackson 不会将新的 JSON 对象附加到现有的 Json 文件中

elasticsearch - 我可以在Logstash和Elasticsearch之间使用Kafka吗? (使用两个卡夫卡)

elasticsearch - Elasticsearch Minhash前缀查询带有通配符?