URL search with query DSL body

I'm trying to use a browser to make a query using the JSON format (Query DSL) on it.
The goal is to test the performance between both type of query format.

My query DSL is the following:

GET /_search
{
"query":
{ "match": "flood" }
}

It's working perfeclty. Now I'm trying to do the same query using the JSON query DSL format on URL (cause my futur query will be more complex).

http://localhost:9200/_search?source={"query"%3A%20{"match"%3A%20{"text"%3A"flood"}}}&source_content_type="application%2Fjson"

But when I do that, I encounter some problems and I cannot access to my results.

{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"invalid Content-Type header [\"application/json\"]"}],"type":"illegal_argument_exception","reason":"invalid Content-Type header [\"application/json\"]"},"status":400}

Any idea ? my source body is a json format, I don't understand why I have this illegal_argument_exception.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.