diff --git a/src/elastic_query.rs b/src/elastic_query.rs index 5078e5a..cbe7b84 100644 --- a/src/elastic_query.rs +++ b/src/elastic_query.rs @@ -45,8 +45,14 @@ impl ElasticQuery { let query = serde_json::to_string(self).unwrap(); let client = reqwest::blocking::Client::new(); - let response = client.get(url).body(query).send()?.text()?; + let response = client + .get(url) + .header("Content-Type", "application/json") + .body(query) + .send()? + .text()?; debug!("Elastic Response:\n {:?}", response); + Ok(serde_json::from_str(&response)?) } }