public class MultipartHttpMessageReader extends LoggingCodecSupport implements HttpMessageReader<MultiValueMap<String,Part>>
HttpMessageReader for reading "multipart/form-data" requests
into a MultiValueMap<String, Part>.
Note that this reader depends on access to an
HttpMessageReader<Part> for the actual parsing of multipart content.
The purpose of this reader is to collect the parts into a map.
logger| Constructor and Description |
|---|
MultipartHttpMessageReader(HttpMessageReader<Part> partReader) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead(ResolvableType elementType,
MediaType mediaType)
Whether the given object type is supported by this reader.
|
HttpMessageReader<Part> |
getPartReader()
Return the configured parts reader.
|
List<MediaType> |
getReadableMediaTypes()
Return the list of media types supported by this reader.
|
reactor.core.publisher.Flux<MultiValueMap<String,Part>> |
read(ResolvableType elementType,
ReactiveHttpInputMessage message,
Map<String,Object> hints)
Read from the input message and decode to a stream of objects.
|
reactor.core.publisher.Mono<MultiValueMap<String,Part>> |
readMono(ResolvableType elementType,
ReactiveHttpInputMessage inputMessage,
Map<String,Object> hints)
Read from the input message and decode to a single object.
|
isEnableLoggingRequestDetails, setEnableLoggingRequestDetailsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetReadableMediaTypes, read, readMonopublic MultipartHttpMessageReader(HttpMessageReader<Part> partReader)
public HttpMessageReader<Part> getPartReader()
public List<MediaType> getReadableMediaTypes()
HttpMessageReadercanWrite(elementType, null). The list may also exclude media types
supported only for a specific element type. Alternatively, use
HttpMessageReader.getReadableMediaTypes(ResolvableType) for a more precise list.getReadableMediaTypes in interface HttpMessageReader<MultiValueMap<String,Part>>public boolean canRead(ResolvableType elementType, @Nullable MediaType mediaType)
HttpMessageReadercanRead in interface HttpMessageReader<MultiValueMap<String,Part>>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<String,Part>> read(ResolvableType elementType, ReactiveHttpInputMessage message, Map<String,Object> hints)
HttpMessageReaderread in interface HttpMessageReader<MultiValueMap<String,Part>>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<String,Part>> readMono(ResolvableType elementType, ReactiveHttpInputMessage inputMessage, Map<String,Object> hints)
HttpMessageReaderreadMono in interface HttpMessageReader<MultiValueMap<String,Part>>elementType - the type of objects in the stream which must have been
previously checked via HttpMessageReader.canRead(ResolvableType, MediaType)inputMessage - the message to read fromhints - additional information about how to read and decode the input