Search queries work using POST but not GET


(Shaunak Kashyap) #1

Elasticsearch DSL is specified using a JSON request body in the HTTP request. In our guide, these search requests use HTTP GET because they describe the action of retrieving information. This works if you click on the "View in Sense" link in the guide which populates the query into the Marvel Sense editor. When you run this query from the Marvel Sense editor, it actually converts the request to a HTTP POST behind the scenes (given that many browsers do not support HTTP GET requests with a request body).

In other words, if you are using curl or other HTTP libraries that do not support HTTP GET with a request body, you can simply execute the query using POST instead of GET.


(system) #2