Class SimpleBody
java.lang.Object
org.apache.hc.client5.http.async.methods.SimpleBody
Message body representation as a simple text string or an array of bytes.
- Since:
- 5.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]
private final String
private final org.apache.hc.core5.http.ContentType
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleBody
(byte[] bodyAsBytes, String bodyAsText, org.apache.hc.core5.http.ContentType contentType) -
Method Summary
Modifier and TypeMethodDescription(package private) static SimpleBody
create
(byte[] body, org.apache.hc.core5.http.ContentType contentType) (package private) static SimpleBody
byte[]
org.apache.hc.core5.http.ContentType
boolean
isBytes()
boolean
isText()
toString()
-
Field Details
-
bodyAsBytes
private final byte[] bodyAsBytes -
bodyAsText
-
contentType
private final org.apache.hc.core5.http.ContentType contentType
-
-
Constructor Details
-
SimpleBody
SimpleBody(byte[] bodyAsBytes, String bodyAsText, org.apache.hc.core5.http.ContentType contentType)
-
-
Method Details