Package discord4j.rest.http
Class FormUrlEncodedWriterStrategy
java.lang.Object
discord4j.rest.http.FormUrlEncodedWriterStrategy
- All Implemented Interfaces:
WriterStrategy<String>
Write to a request from a
String using reactor-netty's HttpClient.RequestSender.send(Publisher).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether the given object type is supported by this writer.write(HttpClient.RequestSender sender, String body) Write a given object to the output message.
-
Constructor Details
-
FormUrlEncodedWriterStrategy
public FormUrlEncodedWriterStrategy()
-
-
Method Details
-
canWrite
Description copied from interface:WriterStrategyWhether the given object type is supported by this writer.- Specified by:
canWritein interfaceWriterStrategy<String>- 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 String body) Description copied from interface:WriterStrategyWrite a given object to the output message.- Specified by:
writein interfaceWriterStrategy<String>- Parameters:
sender- the http request senderbody- the object to write- Returns:
- indicates completion or error
-