Пример #1
0
 private Map<String, Object> parseBody(RestResponse response) throws IOException {
   return XContentFactory.xContent(XContentType.JSON)
       .createParser(
           response.getBody().array(),
           response.getBody().arrayOffset(),
           response.getBody().remaining())
       .map();
 }