Http GET with body - elasticsearch percolate api

I’m trying to call the Elasticsearch 2.3 Percolator API, which requires a
GET request with a body to do a percolator search:

(see Match a document to the registered percolator queries)

When I try to make the request, I’m getting the error: “type body is only
supported for type post and put”

jsonQuery = SerializeJSON({
“doc”: {
“title”: “firewall”
}
});

http = new http();

http.setURL(“https://my-elasticsearch-endpoint/topics/_percolate”);
http.setTimeOut(50);
http.addParam(type=“body”, value=jsonQuery);

http.setMethod(“get”);
httpResult = http.send().getPrefix();

After some research, it appears that a GET request should be permitted with
a body. Is there a workaround here?

Though I did not resolve this issue, I did find out that the elasticsearch
percolate API does support POST for document matching, so I no longer need
to use GET.On Thursday, June 30, 2016 at 4:54:34 PM UTC-6, JP wrote:

I’m trying to call the Elasticsearch 2.3 Percolator API, which requires a
GET request with a body to do a percolator search:

https://www.elastic.co/guide/en/elasticsearch/reference/current/search-percolate.html#_sample_usage
(see Match a document to the registered percolator queries)

When I try to make the request, I’m getting the error: “type body is only
supported for type post and put”

jsonQuery = SerializeJSON({
“doc”: {
“title”: “firewall”
}
});

http = new http();

http.setURL(“https://my-elasticsearch-endpoint/topics/_percolate”);
http.setTimeOut(50);
http.addParam(type=“body”, value=jsonQuery);

http.setMethod(“get”);
httpResult = http.send().getPrefix();

After some research, it appears that a GET request should be permitted
with a body. Is there a workaround here?