Package discord4j.rest.http
Interface ExchangeStrategies
public interface ExchangeStrategies
Defines the strategies to request and response body conversion.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
A mutable builder for creating anExchangeStrategies
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExchangeStrategies
jackson
(ObjectMapper mapper) Return anExchangeStrategies
using the defaults for processing JSON requests using Jackson.List<ReaderStrategy<?>>
readers()
Retrieve the list of reader strategies to convert a response body.List<WriterStrategy<?>>
writers()
Retrieve the list of writer strategies to convert a request body.
-
Method Details
-
writers
List<WriterStrategy<?>> writers()Retrieve the list of writer strategies to convert a request body.- Returns:
- a list of writer strategies
-
readers
List<ReaderStrategy<?>> readers()Retrieve the list of reader strategies to convert a response body.- Returns:
- a list of reader strategies
-
jackson
Return anExchangeStrategies
using the defaults for processing JSON requests using Jackson.- Parameters:
mapper
- the Jackson object mapper- Returns:
- the built strategies
-