Package discord4j.rest.http
Classes supporting HTTP processes like encoding and decoding data.
-
Interface Summary Interface Description ExchangeStrategies Defines the strategies to request and response body conversion.ReaderStrategy<T> Strategy for reading from aHttpClientResponse
and decoding the stream of bytes to an Object of type<Res>
.WriterStrategy<R> Strategy for encoding an object of type<Req>
and writing the encoded stream of bytes to anHttpClientRequest
. -
Class Summary Class Description EmptyReaderStrategy Read a response without a body.EmptyWriterStrategy Write a request without a body.ExchangeStrategies.Builder A mutable builder for creating anExchangeStrategies
FallbackReaderStrategy Read a response as aString
as a catch-all, unless the given response type isErrorResponse
, in which case it will attempt to store the response into theErrorResponse
body
field.JacksonReaderStrategy<T> Read a response into JSON and convert to an Object of type<Res>
using Jackson.JacksonWriterStrategy Write to a request from anObject
to a JSONString
using Jackson.MultipartWriterStrategy Write to a request from aConsumer<HttpClientRequest.Form>
using reactor-netty'sHttpClient.RequestSender.sendForm(java.util.function.BiConsumer)
.