public class MultipartWriterStrategy extends Object implements WriterStrategy<MultipartRequest>
Consumer<HttpClientRequest.Form> using reactor-netty's HttpClient.RequestSender.sendForm(java.util.function.BiConsumer).HttpClientForm| Constructor and Description |
|---|
MultipartWriterStrategy(ObjectMapper objectMapper) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canWrite(Class<?> type,
String contentType)
Whether the given object type is supported by this writer.
|
Mono<HttpClient.ResponseReceiver<?>> |
write(HttpClient.RequestSender send,
MultipartRequest body)
Write a given object to the output message.
|
public MultipartWriterStrategy(ObjectMapper objectMapper)
public boolean canWrite(@Nullable Class<?> type, @Nullable String contentType)
WriterStrategycanWrite in interface WriterStrategy<MultipartRequest>type - the type of object to checkcontentType - the content type for the writetrue if writable, false otherwisepublic Mono<HttpClient.ResponseReceiver<?>> write(HttpClient.RequestSender send, @Nullable MultipartRequest body)
WriterStrategywrite in interface WriterStrategy<MultipartRequest>send - the http request senderbody - the object to write