How can I send an conditional GET method to elasticearch from postman?

Viewed 26

I have a GET request with it's query body as shown below:

GET /courses/_search
{
  "query": {
    "bool": {
      "must": [
        {"match": {"teacher.keyword": "Andrew Ng"}}
      ]
    } 
  }
}

In Postman, GET requests can not have a 'body'. so how can I send this request to the elasticsearch? How should I specify this neseted structure of the body in the request?

1 Answers

Use POST instead

Elasticsearch is a bit more permissive and supports both GET and POST to send a request with a payload.

Related