Package io.avaje.http.client
Interface BodyAdapter
-
- All Known Implementing Classes:
JacksonBodyAdapter
public interface BodyAdapterAdaptor between beans and content of a request or response.Typically converts between beans as JSON content.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> BodyReader<T>beanReader(Class<T> type)Return a BodyReader to read response content and convert to a bean.BodyWriterbeanWriter(Class<?> type)Return a BodyWriter to write beans of this type as request content.<T> BodyReader<List<T>>listReader(Class<T> type)Return a BodyReader to read response content and convert to a list of beans.
-
-
-
Method Detail
-
beanWriter
BodyWriter beanWriter(Class<?> type)
Return a BodyWriter to write beans of this type as request content.- Parameters:
type- The type of the bean this writer is for
-
beanReader
<T> BodyReader<T> beanReader(Class<T> type)
Return a BodyReader to read response content and convert to a bean.- Parameters:
type- The bean type to convert the content to.
-
listReader
<T> BodyReader<List<T>> listReader(Class<T> type)
Return a BodyReader to read response content and convert to a list of beans.- Parameters:
type- The bean type to convert the content to.
-
-