5

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?

1 Answer 1

3

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.