Class ApacheHttpClient5Transport.ContentHttpEntity
- java.lang.Object
-
- org.apache.hc.core5.http.io.entity.HttpEntityWrapper
-
- org.opensearch.client.transport.httpclient5.ApacheHttpClient5Transport.ContentHttpEntity
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,org.apache.hc.core5.http.EntityDetails,org.apache.hc.core5.http.HttpEntity
- Enclosing class:
- ApacheHttpClient5Transport
public static class ApacheHttpClient5Transport.ContentHttpEntity extends org.apache.hc.core5.http.io.entity.HttpEntityWrapperAn entity that lets the caller specify the return value ofisChunked().
-
-
Constructor Summary
Constructors Constructor Description ContentHttpEntity(org.apache.hc.core5.http.HttpEntity entity)Creates aApacheHttpClient5Transport.ContentHttpEntityinstance with the provided HTTP entity.ContentHttpEntity(org.apache.hc.core5.http.HttpEntity entity, boolean chunkedEnabled)Creates aApacheHttpClient5Transport.ContentHttpEntityinstance with the provided HTTP entity.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisChunked()A chunked entity requires transfer-encoding:chunked in http headers which requires isChunked to be true
-
-
-
Constructor Detail
-
ContentHttpEntity
public ContentHttpEntity(org.apache.hc.core5.http.HttpEntity entity)
Creates aApacheHttpClient5Transport.ContentHttpEntityinstance with the provided HTTP entity.- Parameters:
entity- the HTTP entity.
-
ContentHttpEntity
public ContentHttpEntity(org.apache.hc.core5.http.HttpEntity entity, boolean chunkedEnabled)Creates aApacheHttpClient5Transport.ContentHttpEntityinstance with the provided HTTP entity.- Parameters:
entity- the HTTP entity.chunkedEnabled- force enable/disable chunked transfer-encoding.
-
-
Method Detail
-
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.hc.core5.http.EntityDetails- Overrides:
isChunkedin classorg.apache.hc.core5.http.io.entity.HttpEntityWrapper- Returns:
- true
-
-