spring-framework / org.springframework.web.util / DefaultUriBuilderFactory / setEncodingMode
setEncodingMode
open fun setEncodingMode(encodingMode: EncodingMode): Unit
Specify the encoding mode to use when building URIs:
- URI_COMPONENT -- expand the URI variables first and then encode all URI component (e.g. host, path, query, etc) according to the encoding rules for each individual component.
- VALUES_ONLY -- encode URI variable values only, prior to expanding them, using a "strict" encoding mode, i.e. encoding all characters outside the unreserved set as defined in RFC 3986 Section 2. This ensures a URI variable value will not contain any characters with a reserved purpose.
- NONE -- in this mode no encoding is performed.
By default this is set to "URI_COMPONENT".
Parameters
encodingMode - the encoding mode to use