Hi,
I'm trying to register custom query parameter in my plugin handler like this one:
public class EssenceRestAction extends BaseRestHandler {
@Inject
public EssenceRestAction(Settings settings, RestController controller) {
super(settings);
controller.registerHandler(GET, "/_hello", this);
controller.registerHandler(GET, "/_hello/{name}", this);
}
But when I send request to my custom REST endpoint in the test within this code:
Response response = client.performRequest("GET", "/_hello",
Collections.singletonMap("name", ids.get(i)), entity);
I've got this:
org.elasticsearch.client.ResponseException: GET http://localhost:9200/_hello?name=005f3370-4626-4309-92a5-def32fae7e87: HTTP/1.1 400 Bad Request
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"request [/_hello] contains unrecognized parameter: [name]"}],"type":"illegal_argument_exception","reason":"request [/_hello] contains unrecognized parameter: [name]"},"status":400}
How can I correctly register my REST endpoint to handle query parameters? Note: I've also tried to register only controller.registerHandler(GET, "/_hello/{name}", this); but got the same error.
