自定义request
Request request = new Request(HttpMethod.GET.toString(), "/_cat/indices");
request.addParameter("bytes", "b");
request.addParameter("format", "json");
Map<String, Long> map = new HashMap<>(4);
try {
Response response = restHighLevelClient.getLowLevelClient().performRequest(request);
System.out.println(response);
HttpEntity entity = response.getEntity();
InputStream content = entity.getContent();
String res = EntityUtils.toString(response.getEntity());
System.out.println(res);
}
catch (Exception e) {
}