the elasticsearch api may add request body for get. like this.
curl -XGET 'http://localhost:9200/_count?pretty' -d '
{
"query": {
"match_all": {}
}
}
'
but the httpie seems not allow such usage.
HTTPie makes it possible to specify request body for any HTTP method, including GET. In your case, passing it via STDIN
is probably the best way to go:
$ echo '{"query": {"match_all": {}}}' | http GET :9200/_count?pretty
thanks
Most helpful comment
HTTPie makes it possible to specify request body for any HTTP method, including GET. In your case, passing it via
STDIN
is probably the best way to go: