vjgorla commented on code in PR #9758:
URL: https://github.com/apache/nifi/pull/9758#discussion_r1978430168


##########
nifi-extension-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-client-service/src/main/java/org/apache/nifi/elasticsearch/ElasticSearchClientServiceImpl.java:
##########
@@ -1070,4 +1070,14 @@ private Response performRequest(final String method, 
final String endpoint, fina
 
         return client.performRequest(request);
     }
+
+    private String readContentAsUtf8String(HttpEntity entity) throws 
UnsupportedOperationException, IOException {
+        return this.readContentAsString(entity, StandardCharsets.UTF_8);
+    }
+
+    private String readContentAsString(HttpEntity entity, Charset charset) 
throws UnsupportedOperationException, IOException {
+        try (InputStream responseStream = entity.getContent()) {
+            return IOUtils.toString(responseStream, charset);
+        }
+    }

Review Comment:
   Thanks @dan-s1. Fixed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to