Package com.restfb
Class Body
java.lang.Object
com.restfb.Body
The POST body class. It uses the RestFB JsonMapper to convert an object to json String.
You can use your custom mapper to modify the mapping.
-
Method Summary
Modifier and TypeMethodDescriptiongetData()
returns the Body data as Stringstatic Body
build a new body object instance with the given data as immutable inner datastatic Body
withData
(Object data, JsonMapper jsonMapper) build a new body object instance with the given data as immutable inner data
-
Method Details
-
getData
returns the Body data as String- Returns:
- the body data
-
withData
build a new body object instance with the given data as immutable inner data- Parameters:
data
- the data is internally converted into a String using the JsonMapper- Returns:
- the Body instance
-
withData
build a new body object instance with the given data as immutable inner data- Parameters:
data
- the data is internally converted into a String using the provided JsonMapperjsonMapper
- the custom JsonMapper used for the Object to String conversion- Returns:
- the Body instance
-