4

I thought GET is not supposed to have a body. But in the context of elasticsearch, I keep seeing this kind of query (see here for instance):

curl -XGET localhost:9200/test/_msearch --data-binary @requests; echo

How is the binary data sent in this case? Can somebody explains what is going on and how this works? I first thought it was converted to a POST but, I put a proxy in front of Elasticsearch and saw that curl was really sending a GET. Though I could find the data neither in the header, nor in the parameter, nor in the body. So it seems like my proxy also got confused by this request.

But when I execute the request directly against elasticsearch, it works just fine. What gives?

Klaus
  • 2,328
  • 5
  • 41
  • 62

1 Answers1

2

GETs with bodies are allowed but not considered to be very "meaningful". You can see this question and answer for a full discussion. HTTP GET with request body

and this answer about your proxy: https://stackoverflow.com/a/978173/3516034

Community
  • 1
  • 1
Phil
  • 1,226
  • 10
  • 20