Package io.avaje.http.client
Class BodyContent
- java.lang.Object
-
- io.avaje.http.client.BodyContent
-
public class BodyContent extends Object
Content of request or response body used for adapting to beans.This is not used for streaming content.
-
-
Constructor Summary
Constructors Constructor Description BodyContent(String contentType, byte[] content)Create with content type and content.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BodyContentasJson(byte[] content)Create and return as JSON body content given raw content.byte[]content()Return the raw content.StringcontentType()Return the content type.
-
-
-
Field Detail
-
JSON_UTF8
public static final String JSON_UTF8
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BodyContent
public BodyContent(String contentType, byte[] content)
Create with content type and content.
-
-
Method Detail
-
asJson
public static BodyContent asJson(byte[] content)
Create and return as JSON body content given raw content.
-
contentType
public String contentType()
Return the content type.
-
content
public byte[] content()
Return the raw content.
-
-