Package org.opensearch.client
Class RestClient.ContentHttpEntity
java.lang.Object
org.apache.http.entity.HttpEntityWrapper
org.opensearch.client.RestClient.ContentHttpEntity
- All Implemented Interfaces:
org.apache.http.HttpEntity
- Enclosing class:
- RestClient
public static class RestClient.ContentHttpEntity
extends org.apache.http.entity.HttpEntityWrapper
An entity that lets the caller specify the return value of
isChunked().-
Field Summary
Fields inherited from class org.apache.http.entity.HttpEntityWrapper
wrappedEntity -
Constructor Summary
ConstructorsConstructorDescriptionContentHttpEntity(org.apache.http.HttpEntity entity) Creates aRestClient.ContentHttpEntityinstance with the provided HTTP entity.ContentHttpEntity(org.apache.http.HttpEntity entity, boolean chunkedEnabled) Creates aRestClient.ContentHttpEntityinstance with the provided HTTP entity. -
Method Summary
Modifier and TypeMethodDescriptionbooleanA chunked entity requires transfer-encoding:chunked in http headers which requires isChunked to be trueMethods inherited from class org.apache.http.entity.HttpEntityWrapper
consumeContent, getContent, getContentEncoding, getContentLength, getContentType, isRepeatable, isStreaming, writeTo
-
Constructor Details
-
ContentHttpEntity
public ContentHttpEntity(org.apache.http.HttpEntity entity) Creates aRestClient.ContentHttpEntityinstance with the provided HTTP entity.- Parameters:
entity- the HTTP entity.
-
ContentHttpEntity
public ContentHttpEntity(org.apache.http.HttpEntity entity, boolean chunkedEnabled) Creates aRestClient.ContentHttpEntityinstance with the provided HTTP entity.- Parameters:
entity- the HTTP entity.chunkedEnabled- force enable/disable chunked transfer-encoding.
-
-
Method Details
-
isChunked
public boolean isChunked()A chunked entity requires transfer-encoding:chunked in http headers which requires isChunked to be true- Specified by:
isChunkedin interfaceorg.apache.http.HttpEntity- Overrides:
isChunkedin classorg.apache.http.entity.HttpEntityWrapper- Returns:
- true
-