public class FormHttpMessageReader extends LoggingCodecSupport implements HttpMessageReader<MultiValueMap<java.lang.String,java.lang.String>>
HttpMessageReader
to read HTML form data, i.e.
request body with media type "application/x-www-form-urlencoded"
.Modifier and Type | Field and Description |
---|---|
static java.nio.charset.Charset |
DEFAULT_CHARSET
The default charset used by the reader.
|
logger
Constructor and Description |
---|
FormHttpMessageReader() |
Modifier and Type | Method and Description |
---|---|
boolean |
canRead(ResolvableType elementType,
MediaType mediaType)
Whether the given object type is supported by this reader.
|
java.nio.charset.Charset |
getDefaultCharset()
Return the configured default charset.
|
java.util.List<MediaType> |
getReadableMediaTypes()
Return the
MediaType 's that this reader supports. |
reactor.core.publisher.Flux<MultiValueMap<java.lang.String,java.lang.String>> |
read(ResolvableType elementType,
ReactiveHttpInputMessage message,
java.util.Map<java.lang.String,java.lang.Object> hints)
Read from the input message and encode to a stream of objects.
|
reactor.core.publisher.Mono<MultiValueMap<java.lang.String,java.lang.String>> |
readMono(ResolvableType elementType,
ReactiveHttpInputMessage message,
java.util.Map<java.lang.String,java.lang.Object> hints)
Read from the input message and encode to a single object.
|
void |
setDefaultCharset(java.nio.charset.Charset charset)
Set the default character set to use for reading form data when the
request Content-Type header does not explicitly specify it.
|
isEnableLoggingRequestDetails, setEnableLoggingRequestDetails
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
read, readMono
public static final java.nio.charset.Charset DEFAULT_CHARSET
public void setDefaultCharset(java.nio.charset.Charset charset)
By default this is set to "UTF-8".
public java.nio.charset.Charset getDefaultCharset()
public boolean canRead(ResolvableType elementType, @Nullable MediaType mediaType)
HttpMessageReader
canRead
in interface HttpMessageReader<MultiValueMap<java.lang.String,java.lang.String>>
elementType
- the type of object to checkmediaType
- the media type for the read (possibly null
)true
if readable, false
otherwisepublic reactor.core.publisher.Flux<MultiValueMap<java.lang.String,java.lang.String>> read(ResolvableType elementType, ReactiveHttpInputMessage message, java.util.Map<java.lang.String,java.lang.Object> hints)
HttpMessageReader
read
in interface HttpMessageReader<MultiValueMap<java.lang.String,java.lang.String>>
elementType
- the type of objects in the stream which must have been
previously checked via HttpMessageReader.canRead(ResolvableType, MediaType)
message
- the message to read fromhints
- additional information about how to read and decode the inputpublic reactor.core.publisher.Mono<MultiValueMap<java.lang.String,java.lang.String>> readMono(ResolvableType elementType, ReactiveHttpInputMessage message, java.util.Map<java.lang.String,java.lang.Object> hints)
HttpMessageReader
readMono
in interface HttpMessageReader<MultiValueMap<java.lang.String,java.lang.String>>
elementType
- the type of objects in the stream which must have been
previously checked via HttpMessageReader.canRead(ResolvableType, MediaType)
message
- the message to read fromhints
- additional information about how to read and decode the inputpublic java.util.List<MediaType> getReadableMediaTypes()
HttpMessageReader
MediaType
's that this reader supports.getReadableMediaTypes
in interface HttpMessageReader<MultiValueMap<java.lang.String,java.lang.String>>