How to send elasticsearch multi search request in Postman?
You can also make your request body be json format and change your Content-Type be application/json, please take a look as below
Three things are important here:
- When inserting body, select raw radiobutton and Text (or JSON) from dropdown.
- Add header: Content-type: application/x-ndjson
- Most important: put new line after the last line of your query
Body:
Header:
Curl version:
curl -X POST \
http://127.0.0.1:9200/_msearch \
-H 'cache-control: no-cache' \
-H 'content-type: application/x-ndjson' \
-d '{"index":"script","type":"test"}
{"query":{"match_all":{}}}
'