Java RestClient sending gzip update

Is there a way to send gzipped document update to ES using the low-level Java RestClient?

I intend to send a _bulk update using RestClient this way:

restClient.performRequest("POST", "endpoint/_bulk", emptyMap(),
    new GzipCompressingEntity(new NStringEntity("<document>", "application/json")));

but I'm getting the following error:

java.lang.UnsupportedOperationException: null
! at org.apache.http.client.entity.GzipCompressingEntity.getContent(GzipCompressingEntity.java:100)
1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.