spring-framework / org.springframework.web.util / UriUtils / encodeQuery

encodeQuery

open static fun encodeQuery(query: String, encoding: String): String

Encode the given URI query with the given encoding.

Parameters

query - the query to be encoded

encoding - the character encoding to encode to

Exceptions

UnsupportedEncodingException - when the given encoding parameter is not supported

Return
the encoded query

open static fun encodeQuery(query: String, charset: Charset): String

Encode the given URI query with the given encoding.

Parameters

query - the query to be encoded

charset - the character encoding to encode to

Return
the encoded query

Since
5.0