spring-framework / org.springframework.http.codec / FormHttpMessageReader

FormHttpMessageReader

open class FormHttpMessageReader : HttpMessageReader<MultiValueMap<String, String>>

Implementation of an HttpMessageReader to read HTML form data, i.e. request body with media type "application/x-www-form-urlencoded".

Author
Sebastien Deleuze

Author
Rossen Stoyanchev

Since
5.0

Constructors

<init>

FormHttpMessageReader()

Implementation of an HttpMessageReader to read HTML form data, i.e. request body with media type "application/x-www-form-urlencoded".

Properties

DEFAULT_CHARSET

static val DEFAULT_CHARSET: Charset

Functions

canRead

open fun canRead(elementType: ResolvableType, mediaType: MediaType): Boolean

getDefaultCharset

open fun getDefaultCharset(): Charset

Return the configured default charset.

getReadableMediaTypes

open fun getReadableMediaTypes(): MutableList<MediaType>

read

open fun read(elementType: ResolvableType, message: ReactiveHttpInputMessage, hints: MutableMap<String, Any>): Flux<MultiValueMap<String, String>>

readMono

open fun readMono(elementType: ResolvableType, message: ReactiveHttpInputMessage, hints: MutableMap<String, Any>): Mono<MultiValueMap<String, String>>

setDefaultCharset

open fun setDefaultCharset(charset: Charset): Unit

Set the default character set to use for reading form data when the request Content-Type header does not explicitly specify it.

By default this is set to "UTF-8".