public class FormHttpMessageReader extends Object implements HttpMessageReader<org.springframework.util.MultiValueMap<String,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 Charset |
DEFAULT_CHARSET |
| Constructor and Description |
|---|
FormHttpMessageReader() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead(org.springframework.core.ResolvableType elementType,
MediaType mediaType)
Indicates whether the given class can be read by this converter.
|
Charset |
getDefaultCharset()
Return the configured default charset.
|
List<MediaType> |
getReadableMediaTypes()
Return the list of
MediaType objects that can be read by this converter. |
reactor.core.publisher.Flux<org.springframework.util.MultiValueMap<String,String>> |
read(org.springframework.core.ResolvableType elementType,
ReactiveHttpInputMessage inputMessage,
Map<String,Object> hints)
Read a
Flux of the given type form the given input message, and returns it. |
reactor.core.publisher.Mono<org.springframework.util.MultiValueMap<String,String>> |
readMono(org.springframework.core.ResolvableType elementType,
ReactiveHttpInputMessage inputMessage,
Map<String,Object> hints)
Read a
Mono of the given type form the given input message, and returns it. |
void |
setDefaultCharset(Charset charset)
Set the default character set to use for reading form data when the
request Content-Type header does not explicitly specify it.
|
public static final Charset DEFAULT_CHARSET
public void setDefaultCharset(Charset charset)
By default this is set to "UTF-8".
public Charset getDefaultCharset()
public boolean canRead(org.springframework.core.ResolvableType elementType,
MediaType mediaType)
HttpMessageReadercanRead in interface HttpMessageReader<org.springframework.util.MultiValueMap<String,String>>elementType - the stream element type to test for readabilitymediaType - the media type to read, can be null if not specified.
Typically the value of a Content-Type header.true if readable; false otherwisepublic reactor.core.publisher.Flux<org.springframework.util.MultiValueMap<String,String>> read(org.springframework.core.ResolvableType elementType, ReactiveHttpInputMessage inputMessage, Map<String,Object> hints)
HttpMessageReaderFlux of the given type form the given input message, and returns it.read in interface HttpMessageReader<org.springframework.util.MultiValueMap<String,String>>elementType - the stream element type to return. This type must have previously been
passed to the canRead method of this interface, which must have
returned true.inputMessage - the HTTP input message to read fromhints - additional information about how to read the bodyFlux of elementspublic reactor.core.publisher.Mono<org.springframework.util.MultiValueMap<String,String>> readMono(org.springframework.core.ResolvableType elementType, ReactiveHttpInputMessage inputMessage, Map<String,Object> hints)
HttpMessageReaderMono of the given type form the given input message, and returns it.readMono in interface HttpMessageReader<org.springframework.util.MultiValueMap<String,String>>elementType - the stream element type to return. This type must have previously been
passed to the canRead method of this interface, which must have
returned true.inputMessage - the HTTP input message to read fromhints - additional information about how to read the bodyMono of objectpublic List<MediaType> getReadableMediaTypes()
HttpMessageReaderMediaType objects that can be read by this converter.getReadableMediaTypes in interface HttpMessageReader<org.springframework.util.MultiValueMap<String,String>>