Package discord4j.rest.http
Class EmptyWriterStrategy
java.lang.Object
discord4j.rest.http.EmptyWriterStrategy
- All Implemented Interfaces:
WriterStrategy<Void>
Write a request without a body.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether the given object type is supported by this writer.write(HttpClient.RequestSender sender, Void body) Write a given object to the output message.
-
Constructor Details
-
EmptyWriterStrategy
public EmptyWriterStrategy()
-
-
Method Details
-
canWrite
Description copied from interface:WriterStrategyWhether the given object type is supported by this writer.- Specified by:
canWritein interfaceWriterStrategy<Void>- Parameters:
type- the type of object to checkcontentType- the content type for the write- Returns:
trueif writable,falseotherwise
-
write
public Mono<HttpClient.ResponseReceiver<?>> write(HttpClient.RequestSender sender, @Nullable Void body) Description copied from interface:WriterStrategyWrite a given object to the output message.- Specified by:
writein interfaceWriterStrategy<Void>- Parameters:
sender- the http request senderbody- the object to write- Returns:
- indicates completion or error
-