org.springframework.http.codec

Class FormHttpMessageReader

    • Field Detail

      • DEFAULT_CHARSET

        public static final java.nio.charset.Charset DEFAULT_CHARSET
        The default charset used by the reader.
    • Constructor Detail

      • FormHttpMessageReader

        public FormHttpMessageReader()
    • Method Detail

      • setDefaultCharset

        public 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.

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

      • getDefaultCharset

        public java.nio.charset.Charset getDefaultCharset()
        Return the configured default charset.
      • canRead

        public boolean canRead(ResolvableType elementType,
                               @Nullable
                               MediaType mediaType)
        Description copied from interface: HttpMessageReader
        Whether the given object type is supported by this reader.
        Specified by:
        canRead in interface HttpMessageReader<MultiValueMap<java.lang.String,java.lang.String>>
        Parameters:
        elementType - the type of object to check
        mediaType - the media type for the read (possibly null)
        Returns:
        true if readable, false otherwise