public interface BodyContent
Content of request or response body used for adapting to beans.
This is not used for streaming content.
-
Method Summary
Modifier and TypeMethodDescriptionstatic BodyContent
asJson
(byte[] content) Create BodyContent for JSON byte[] content.byte[]
content()
Return the content as bytes.Return the content as UTF8 string.Return the content type.static BodyContent
of
(byte[] content) Create BodyContent with the given byte[] content.static BodyContent
Create BodyContent with the given string content.static BodyContent
Create BodyContent with the given the content type and byte[] content.static BodyContent
Create BodyContent with the given the content type and string content.
-
Method Details
-
of
Create BodyContent with the given byte[] content. -
of
Create BodyContent with the given string content. -
of
Create BodyContent with the given the content type and string content. -
of
Create BodyContent with the given the content type and byte[] content. -
asJson
Create BodyContent for JSON byte[] content. -
contentType
String contentType()Return the content type. -
content
byte[] content()Return the content as bytes. -
contentAsUtf8
String contentAsUtf8()Return the content as UTF8 string.
-